Re: Help With PlotLegend, please.
- To: mathgroup at smc.vnet.net
- Subject: [mg14346] Re: Help With PlotLegend, please.
- From: "Allan Hayes" <hay at haystack.demon.co.uk>
- Date: Thu, 15 Oct 1998 00:28:49 -0400
- References: <6vur4p$8kl@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Wretch wrote in message <6vur4p$8kl at smc.vnet.net>...
>I am plotting three curves on the same 2D plot and wish to plot a legend
>below that indicates which is which. The problem I'm having is that
>more darkly shaded lines (using the Thickness[] option) do not appear
>any darker or thicker on the legend, which makes distinguishing the
>solid lines in the plot impossible.
>
>Here's my Mathematica 3.0 input:
>
>*******************************************************************
>Plot[{f[x],g[x],h[x]},{x,xlow,xhigh},PlotStyle->{{},Dashing[{.02}],
> Thickness[.008]},PlotLegend->{"f(x)","g(x)","h(x)"},LegendPosition->
> {-1,-1.2},LegendSize->{1.7,.5}]
>*******************************************************************
>
>f[x] is a normal solid line
>g[x] is a dashed line
>h[x] is a thick solid line
>
>
>The problem is that the legend lines for f(x) and h(x) appear
>indistinguishable, both in the mathematica output and on a printed
>postscript file of the plot.
>
>What may I do to remedy this?
>
>Thanks,
>
>AC
>
Thickness[.008]} is quite thin - .008 of the plot width. However, even
with Thickness[.02] the plot line is thick but the legend line is not.
Using Thickness[.1] does give both thick, but the plot line is *too*
thick. It looks as if the thickness is scaled in the legend.
AbsoluteThickness in place of Thickness (setting the thickness in
points) seems to do the trick:
<<Graphics`Legend`
Plot[{x,x^2,x^3},{x,0,2},PlotStyle->{{},Dashing[{.02}],
AbsoluteThickness[3]},PlotLegend->{"f(x)","g(x)","h(x)"},LegendPosition->
{-1,-1.2},LegendSize->{1.7,.5}]
----------------------
Allan Hayes
Mathematica Training and Consulting
www.haystack.demon.co.uk
hay at haystack.demon.co.uk
Voice: +44 (0)116 271 4198
Fax: +44 (0)870 164 0565