Re: Legend option for ListPlot
- To: mathgroup at smc.vnet.net
- Subject: [mg85173] Re: Legend option for ListPlot
- From: Gopinath Venkatesan <gopinathv at ou.edu>
- Date: Thu, 31 Jan 2008 00:46:13 -0500 (EST)
Hi Rajani, I am using the following legend for my data, but it still needs some modification especially if more legends are added, the text font size and location should be changed accordingly and hence subject to change for minor changes in the label. I have DrawGraphics package also but I am short of time to learn and use it for my project. If you have time, you can use that package from Mr. David Park, (google and you can find his web page). ShowLegend[ ListPlot[{YourList}, Joined -> True, InterpolationOrder -> n, PlotStyle -> {Directive[Blue, Dashed]}, Frame -> True, FrameLabel -> {"X Axis Label (in Units)", "Y Axis Label (in Units)"}, GridLines -> {Automatic, Automatic}, GridLinesStyle -> {Directive[Black], Directive[Green, Dashed]}, Background -> LightYellow, ImageSize -> 400, BaseStyle -> {FontSize -> 12, FontWeight -> "Bold"}], {{{Graphics[{Directive[Blue, Dashed], Line[{{0, 0}, {3, 0}}]}], "Legend Description"}}, LegendSize -> {1, 0.2}, LegendPosition -> {-0.4, -0.2}, BaseStyle -> {FontSize -> 12, FontWeight -> "Bold"}, LegendTextOffset -> {-0.5, 0}}] Note: YourList is a list of data, {x[i],y[i]}. If you find a nice way to fix/ignore changes in the text font, locations, etc., please feel free to post here. Regards, Gopinath University of Oklahoma