MathGroup Archive 2007

[Date Index] [Thread Index] [Author Index]

Search the Archive

GraphicsGrid bug and work around

  • To: mathgroup at smc.vnet.net
  • Subject: [mg80717] GraphicsGrid bug and work around
  • From: "Michael A. Gilchrist" <mikeg at utk.edu>
  • Date: Thu, 30 Aug 2007 02:29:16 -0400 (EDT)

Hi all,

I'm not sure about y'all but I find the new Mathematica 6.0 a bittersweet 
experience.  Yes, there are lots of upgrades, but there are also lots of 
commands that are now obsolete and no clear or easily implemented upgrade 
solution (e.g. Column[] command from 'DataManipulation or DropNonNumeric[] 
-- rewriting my code is a 'feature' I could do without in an upgrade).

Anyway, to my point.  There's a bug in GraphicsGrid[] (the replacement for 
GraphicsArray[]) and a simple work around that I thought I'd share.


Specifically, the PlotLabel occurs mid figure and any Frames and FrameLabels 
used in a Show[] will also be misplaced.

 	Table[g[j] =
  		ListPlot[
    		Table[Nest[Mod[2 #, 1] & , Sum[10^-i, {i, j}], n], {n, 50}],
    		PlotLabel -> StringForm["Subplot ``", j]];, {j, 4}]


 	GraphicsGrid[{{g[1], g[2]}, {g[3], g[4]}},
  		PlotLabel -> "Misplaced Plot Label"]

The work around is quite simple, essentially you need to use the Frame->All 
command within the GraphicsGrid[] to get proper placement of the items I 
mentioned above.  If you don't want to see the Frames then you need to also 
use FrameStyle->White in GraphicsGrid[].


 	GraphicsGrid[{{g[1], g[2]}, {g[3], g[4]}},
  		Frame->All,
  		FrameStyle->White,
  		PlotLabel -> "Properly Placed Plot Label"]

  My humble suggestion is to add the line
 	SetOptions[GraphicsGrid, Frame->All, FrameStyle->White]
to your .Mathematica/Kernel/init.nb file

I've always appreciated the help I've gotten from this listserv so I hope 
others find this useful.


Mike


  • Prev by Date: Re: {Precision@N[2^1024],N[2^1024]===$MaxMachineNumber}
  • Next by Date: Re: GUIKit
  • Previous by thread: Placing axis origin at origin for 3D plots
  • Next by thread: Input cell Word Wrapping