# Strategies for drawing good graphs (graph theory)

Okay, if I want to have a nice drawing of a 5-cycle, it's built in. If I do

```
g = graphs.CycleGraph(5)
g.show()
```

it automatically draws it in a nice way. But, if I am looking at some random graph of order 11 that I want a nice picture of, for my dissertation, how am I supposed to get a nice picture? According to my question here, kcrisman says the graph editor is broken. That would have been a nice tool. My current strategy is to repeatedly have it show the graph and save it as a pdf until it gets into the format I want, i.e., run the following code over and over.

```
graph_plot = g.plot(vertex_colors={'white'})
graph_plot.show()
graph_plot.save('graph.pdf')
```

But, this doesn't always end up with the picture I really want. And, occasionally I want to do something like delete a vertex and draw the graph again, but now all of the sudden the plot behaves completely differently and it never looks anything like the previous drawing minus one vertex.

So, what are some ways to get around this?

There really isn't an agreed method to drawing a nice graph so I doubt a working graph editor would solve the problem. Here are [some heuristics that go into deciding if the graph looks nice](http://en.wikipedia.org/wiki/Graph_drawing) but these promptly get thrown out the window for special classes of graphs. Things will look best if you do it yourself using LaTeX. [Altermundus](http://altermundus.com/pages/links/index.html) has developed the packages using Tikz; his "Gallery of Named Graphs" has 3 versions of the Petersen graph starting on page 73. Which looks best? Most expect it to be drawn using form 1.

@dazedANDconfused Good point there, but I'm not worried about making THE best looking graph. I'm worried about A pretty good looking one. For example, in DSMs answer below, it's obvious that the second version is MUCH better than the first. I don't care if there is some other even better version out there, I would be fine with that second version. With the graph editor, I would be able to move the vertices around as I please and put it in a form that seems pretty nice. Without that, the answer by DSM seems to be very helpful. Use many iterations to get one that looks pretty nice. Save positions if I want to do anything like delete a vertex, and then the new graph obtained still has the same positions.