Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

Is there a "gallery" view of all the graphs available in GraphData?

I realize that some graphs may not lend themselves to such representation (e.g. some may have so many nodes that their thumbnails would all be unrecognizable, and indistinguishable, dark blobs). But even a gallery limited to those graphs that lend themselves to such representation would be of great help.

EDIT: the "gallery" does not need to be represented within Mathematica itself. A web page, PDF document, etc. would do just as well.

share|improve this question
add comment

1 Answer

up vote 4 down vote accepted

First thing to remember is that GraphData is a very large collection - so gallery needs to be carefully constructed not to drain resources. Loading all images in the notebook would be at least strenuous:

GraphData[All] // Length
7184

Take a look at the following demonstrations:

The Documentation center also provides a small code snippet to browse graphs interactively. With slight modification here it is:

Manipulate[
 Column[{GraphData[graph], GraphData[graph, property]}], {{graph, 
   "PappusGraph"}, GraphData[All]}, {{property, "AllImages"}, 
  Complement @@ GraphData /@ {"Properties", "Classes"}}]

Or you can make up some sort of thumbnails gallery. You then can export thumbnails for a webpage or large image - to make a poster for example. Here is a start:

poster = Grid[Partition[Column[{
  Style[#, 12, Orange, FontFamily -> "Calibri"], 
  Show[SetProperty[GraphData[#], GraphStyle -> "BackgroundBlack"], ImageSize -> 120]}] & /@ 
     GraphData[All][[4540 ;; 4620]], 5], Background -> Black];

Export["test.png", poster]

enter image description here

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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