Question

I had some very strange problems with GraphicsGrid. The individual PraphPlot:s looks nice and ok, but the code GraphicsGrid[{{GraphPlot[{{a -> b, "ab"}, {a -> c, "7"}}]}, {GraphPlot[{{a -> b, "5"}, {a -> c, "2"}}]}}] just produces 2 big clots of garbage. If I remove the edge labels, everything works as expected. I am using Mathematica 7.0.0.

Was it helpful?

Solution

I got the same as you did, though I'd have called them small bits of rubbish. I fiddled around for a few minutes and got this:

g1 = GraphPlot[{{a -> b, "ab"}, {a -> c, "7"}}];
g2 = GraphPlot[{{a -> b, "5"}, {a -> c, "2"}}];
Grid[{{g1}, {g2}}]

which is a bit different but maybe of some use. Got to get back to work now.

OTHER TIPS

Personally, I hate using GraphicsGrid as I find its results unpredictable. As you commented on @High Performance Mark's answer that this is to be included in a paper (i.e. LaTeX), I'd suggest using the LevelScheme package by Mark Caprio. He's spent a lot of time figuring out how to lay out graphics in Mathematica, and it allows you to do sane things with tick marks that Mathematica does not do by default. It isn't the fastest package in the world, and takes a little to learn, but I highly recommend it.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top