Re: Error List Plot with Legends
- To: mathgroup at smc.vnet.net
- Subject: [mg107671] Re: Error List Plot with Legends
- From: dh <dh at metrohm.com>
- Date: Mon, 22 Feb 2010 08:32:33 -0500 (EST)
- References: <hltdua$s3m$1@smc.vnet.net>
Hi Ramiro
ErrorListPlot does not have the option "PlotLegend". This is certainly
not a nice feature, but we may use the more complicated "ShowLegend"
instead. Here is an example:
Needs["ErrorBarPlots`"];
Needs["PlotLegends`"]; ShowLegend[
ErrorListPlot[{Table[{i, RandomReal[0.5]}, {i, 10}],
Table[{i + 3, RandomReal[0.5]}, {i, 10}]},
Joined ->
True], {{{Graphics[{Red, Disk[{0, 0}, 1]}],
"A"}, {Graphics[{Blue, Disk[{0, 0}, 1]}], "B"}},
LegendPosition -> {1, -.5}, LegendSize -> .5}]
Daniel
On 22.02.2010 09:06, Ramiro wrote:
> Any suggestions on how to add a legend in an ErrorBarPlot?
>
> The simple PlotLegend option that used to work on ListPlot doesn't
> work here.
>
> Needs["ErrorBarPlots`"];
> Needs["PlotLegends`"];
> ListPlot[{Table[i, {i, 10}], Table[i + 3, {i, 10}]}, Joined -> True,
> PlotLegend -> {"A", "B"}]
> ErrorListPlot[{Table[{i, RandomReal[0.5]}, {i, 10}],
> Table[{i + 3, RandomReal[0.5]}, {i, 10}]}, Joined -> True,
> PlotLegend -> {"A", "B"}]
>
--
Daniel Huber
Metrohm Ltd.
Oberdorfstr. 68
CH-9100 Herisau
Tel. +41 71 353 8585, Fax +41 71 353 8907
E-Mail:<mailto:dh at metrohm.com>
Internet:<http://www.metrohm.com>