Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2007
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2007

[Date Index] [Thread Index] [Author Index]

Search the Archive

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?

> 




  • Prev by Date: Re: how to find complete integral of pde
  • Next by Date: Function[x...] and #& not equivalent
  • Previous by thread: RE: Using legend with FilledPlot
  • Next by thread: Re: Using legend with FilledPlot