I'm new to Mathematica and can't get my problem solved.

I want to display a list of HighlightGraph objects in MatrixForm like GraphicsGrid.

This is my current tryout create a 3xn matrix

 Table[# &, {3}, {(Length[graphLst] / 3) + Mod[Length[graphLst], 3]}]
 ] /@ graphLst

This is the output.


I can't figure it out how to get this thing going.

Can you lend me some help?


1 Answer 1


Since you provided no data, I'll create my own. Partition is your friend (read its documentation on how to handle non-rectangular results if your list of graphs is not a multiple of 3 in your case).:

graphs = HighlightGraph[CompleteGraph[#], {1 \[UndirectedEdge] 2, 
      Style[3 \[UndirectedEdge] 4, Green]}] & /@ Range[3, 15];

And then make a 3XN grid:

GraphicsGrid[Partition[graphs, 3], Frame->All]

enter image description here

  • $\begingroup$ Thanks works very fine :-) Is it also possible to label each graph in the grid specifically? For example: above your first graph in the grid will be the label displayed {1, 2} (the vertices which are connected) $\endgroup$
    – Chris
    Apr 30, 2014 at 11:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.