RE: I hate using Legend
- To: mathgroup at smc.vnet.net
- Subject: [mg29192] RE: [mg29147] I hate using Legend
- From: "Annetts, David (DEM, North Ryde)" <David.Annetts at syd.dem.csiro.au>
- Date: Sat, 2 Jun 2001 05:54:46 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
Hi Brett, > I am very frustrated by the Legend package. > > I have tried using it on and off for several years now, > and I am always dissatisfied with its output. > > The main difficulty I have is with the size of the legend box > being too small for the key label I want to use. > It works fine for single (or a few) letter labels, > but seems to screw up for a label of more than about 10 characters. > The box clips the longer labels. > I've tried using LabelTextSpacing, etc but it then > opens a can of worms trying to balance all the spacings > to get a decent label. > > Does anyone else have these problems with Legend? > > Are there any easy answers? Truely, Legend sucks:) For me, it sucks the least when I construct my legends by hand. This means that my legends tend to look like:- ltxt = StringReplace[#, {".AMR" -> "", "203" -> "LF95"}] & /@ ToUpperCase[ifiles]; llin = Graphics[{pcol[[#]], Line[{{-1, 0}, {0, 0}}]}] & /@ Range[Length[pcol]]; lgnd = {Transpose[{llin, ltxt}], LegendLabel -> "Compiler", LegendOrientation -> Vertical, LegendShadow -> None, LegendSize -> {.2, .4}, LegendPosition -> {.75, -.25} }; and I use them via ShowLegend[graphic, lgnd]. Often, considerable experimentation in the settings of LegendSize and LegendPosition is required to get the thing positioned correctly. This seems to be sufficiently versatile and allows me, for example, to have a single Legend for a GraphicsArray of Plots. This method allows finer control over FontSize and Line thickness. Because the graphic postion of the Legend is constructed by hand, it allows PlotSymbols and Lines to be overlayed and coloured when (if?) you want to have GraphicArrays and/or Plots with symbols on them so that you don't pay a premium for publication of Figures in colour. The problem is that coordinates in Legend are based on the single graphic rather than on the plot within the graphic. For Contour & Density plots, Wickham-Jones' ExtendGraphics package has some useful options and it may be worth trying these. Regards, Dave. ------------------------------- David Annetts EM Modelling Analyst CSIRO DEM, North Ryde Tel: (+612) 9490 5416 Fax: (+612) 9490 5467 Include "usual_disclaimers" -------------------------------