Re: Adding labels to a GraphicsGrid object
- To: mathgroup at smc.vnet.net
- Subject: [mg113514] Re: Adding labels to a GraphicsGrid object
- From: Zach Bjornson <bjornson at stanford.edu>
- Date: Sun, 31 Oct 2010 05:37:07 -0500 (EST)
- References: <iaj4ma$n5a$1@smc.vnet.net>
Does using Labeled[(*your graphics object(s)*),(*label*)] (with its Alignment and Spacings options) not do what you need? It's a bit difficult to give advice on this (and your earlier thread) without example code. I'd be a bit surprised if you had to write your own intricate labeling function. Best, Zach On 10/31/2010 12:08 AM, kj wrote: > As I described in an earlier post, I am trying to add labels to a > complex GraphicsGrid object. > > This object is in fact a GraphicsRow of GraphicsGrid objects. > > I need to add various labels on each side of the overall graphic. > These labels must line up with various elements of the overall > graphic. Many of these labels are associated with closely-spaced > objects, therefore they have to be placed within tight tolerances. > Also, I need to generate many figures like this one, so manual > adjustment of the label positions is out of the question. > > I've tried many ways to do this, but they have all failed. My most > successful attempt so far used heuristics to determine the positions > of the desired labels. To do this my code extracted the centers > of the elements in the various grids, and performed the necessary > scaling and translations of these points to obtain their coordinates > in the overall graphic (which I call "global" coordinates). > > The computed global coordinates are off. The problem (I think) > rests with the computed scaling factor, for converting the coordinates > local to each sub-figure to the global coordinates of the entire > array. I have not found a way to compute this factor with sufficient > accuracy. I can tell you what doesn't work: taking the ratio of > the 4th parameter of the Inset objects generated by GraphicsGrid > to the PlotRange of the inset image. The reason for this is that > area corresponding to this PlotRange is substantially smaller (to > an unpredictable degree) than the area corresponding to the 4th > parameter to Inset. > > If anyone can tell me how I can compute the exact scaling factor > for converting from the local coordinates of the arrayed subfigures > to the global coordinates of the entire composite figure I'd greatly > appreciate it! > > TIA! > > ~kj >