Re: PlotLegend Question

*To*: mathgroup at smc.vnet.net*Subject*: [mg99279] Re: PlotLegend Question*From*: Nicholas <physnick at gmail.com>*Date*: Sat, 2 May 2009 05:55:02 -0400 (EDT)*References*: <gtef0g$113$1@smc.vnet.net>

On May 1, 5:22 am, "Kevin J. McCann" <Kevin.McC... at umbc.edu> wrote: > When I use PlotLegend the amount of space devoted to the line (red line, > or whatever) in the legend is pretty small. In fact, when the line is > dashed or dash-dotted, it is difficult to tell the difference. Any ideas? > > Thanks, > > Kevin > Here is an example > > << PlotLegends` > bs = {FontFamily -> "Arial", FontSize -> 14, FontWeight -> Bold}; > SetOptions[Plot, > Frame -> True, > FrameStyle -> AbsoluteThickness[2], > GridLines -> Automatic, > PlotStyle -> {{Red, AbsoluteThickness[2]}, {Black, > AbsoluteThickness[2]}, {Blue, > AbsoluteThickness[2]}, {Darker@Green, AbsoluteThickness[2]}}, > BaseStyle -> bs > ]; > Plot[{Sin[x], Cos[x], Tan[x]}, {x, 0, 1}, > PlotStyle -> {Directive[Blue, Thick], > Directive[Thick, Red, DotDashed], Directive[Thick, Green, Dotted]= }, > Background -> LightOrange, PlotLegend -> {"sin x", "cos x", "tan x"}, > LegendPosition -> {-.6, 0.1}, > LegendOrientation -> Vertical, > LegendBackground -> LightPurple, > LegendShadow -> {.02, -.02}, > LegendSize -> {0.3, 0.35}, FrameLabel -> {"x", "trig functions"} > ] I had the same problem yesterday. I tried all variations of the options mentioned in the Plot Legends Help, but to no avail. Then I realized that I could use ShowLegend to make my own legend with any thickness/style I wanted, but this was freezing my machine. It would just crash my mathematica session. However, I was in Linux and that might have been the reason, I don't know if it is reproducible in other operating systems. Either way, you could use ShowLegend to specify a legend, but I will be interested to see if anyone posts a solution to the problem with the normal PlotLegend command.