views:

146

answers:

3

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.

+1  A: 

Hi

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.

Mark

High Performance Mark
Yes, that solution I found as well, but my goal is to produce one single .eps file for LaTeX inclusion. I can of course save them as two files, but then I have to fiddle with LaTeX and it also takes more space.
Paxinum
A: 

Mark's solution looks nice.

I have Mathematica 7.0.1 and the the graphs produced by your code corrected themselves when I resized them. It looks like a Mathematica Error in some plotting option.

Will post more if I find out which error is causing the problem.

Davorak
+1  A: 

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.

rcollyer