Re: Using legend with FilledPlot

*To*: mathgroup at smc.vnet.net*Subject*: [mg74410] Re: Using legend with FilledPlot*From*: dh <dh at metrohm.ch>*Date*: Tue, 20 Mar 2007 05:52:06 -0500 (EST)*References*: <etnju8$fuv$1@smc.vnet.net>

Hi Michelasso, FilledPlot does not take the option Legend, therefore, you need to use ShowLegend. Here is an example, assuming that your graphics is in g1: << Graphics`Legend` legend = {{{Graphics[{Green, Line[{{0.051, 0.7}, {0.15, 0.7}}]}], "aaa"}, {Graphics[{Blue, Line[{{0.05, 0.7}, {0.15, 0.7}}]}], "bbb"}}, LegendPosition -> {1.1, -0.4}}; ShowLegend[g1, legend] Daniel Michelasso wrote: > Ok, I have tried to answer to myself to the previous questions I made, > and I have almost managed to get what I want, except for one thing: I > cannot put legend into grpahics I draw with FilledPlot funtion. > For example this works: > > Plot[{Sin[x], Cos[x]}, {x, -3, 3}, PlotStyle -> {Hue[0.4], Hue[0.6]}, > PlotLegend -> {"a", "b"}, LegendTextSpace -> 10, > LegendShadow -> None, LegendPosition -> {0.2, -0.3}, > LegendSize -> {0.9, 0.2}] > > but if I replace Plot with FilledPlot I don't have anymore a legend. > Is there any way to obtain a legend with FilledPlot? >