Re: Re: two plots in Mathemtica 7. Bug?
- To: mathgroup at smc.vnet.net
- Subject: [mg95895] Re: [mg95759] Re: two plots in Mathemtica 7. Bug?
- From: John Fultz <jfultz at wolfram.com>
- Date: Thu, 29 Jan 2009 05:56:21 -0500 (EST)
- Reply-to: jfultz at wolfram.com
On Mon, 26 Jan 2009 05:03:40 -0500 (EST), Bob F wrote: > On Jan 25, 7:47 pm, "sv07171024" <steven_... at telenet.be> wrote: > >> Hi, >> when I execute >> >> << ComputationalGeometry`;nodes = Table[Random[], {20}, {2}]; >> DiagramPlot[nodes] ; PlanarGraphPlot[nodes] >> >> in Mathematica 7 I only get the latter (the Delaunay diagram), while, >> IIRC, Mathematica 6 showed both. I found that I could get both plots if >> I add a second semi-column between the plot statement. In this case >> they are put side by side rather than above each other, with the >> semi-columns between them. A bug? >> > A semicolon suppresses graphics output, just like it suppresses text > output. So the behavior of the semicolon is now more consistent no > matter what it refers to. > > I think this is true in version 6 and newer. But your comment about > the two semicolons producing side by side plots completely stumps me. > I tried it on my Mac with version 7 and it too gives side-by-side > (though much smaller) plots of the two planar graphs. > > If you just put the first DiagramPlot[] command on its own line > (without the semicolon) and you get both plots. e.g. > > << ComputationalGeometry`; nodes = Table[Random[], {20}, {2}]; > DiagramPlot[nodes] > PlanarGraphPlot[nodes] > > -Bob Concerning the mention of two semicolons...I thought somebody else might mention this, but if they did, I missed it. A double semicolon is actually a completely different Mathematica operator. In[1]:= FullForm[1;;2] Out[1]//FullForm= Span[1,2] So the plots are placed side-by-side with the doubled semicolon between them because Mathematica is preserving it as a Span operator. Sincerely, John Fultz jfultz at wolfram.com User Interface Group Wolfram Research, Inc.