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

MathGroup Archive 2006

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

Search the Archive

Re: Graphics--Need Help: How to show legends for graphics under Show Command?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg71260] Re: [mg71248] Graphics--Need Help: How to show legends for graphics under Show Command?
  • From: Bob Hanlon <hanlonr at cox.net>
  • Date: Sun, 12 Nov 2006 06:47:58 -0500 (EST)
  • Reply-to: hanlonr at cox.net

Needs["Graphics`"];

ShowLegend[
    DisplayTogether[
      Plot[Sin[x],{x,-Pi/2,Pi/2},
         PlotStyle->Hue[0.6]],
      Plot[Cos[x],{x,Pi/2,3 Pi/2},
        PlotStyle->Hue[0.8]],
      Ticks->{PiScale,Automatic},
      DisplayFunction->Identity],
    {{{Hue[0.6],"Sin(x)"},
        {Hue[0.8],"Cos(x)"}},
      LegendPosition->{.25,.2},
      LegendShadow->None,
      LegendSize->{.5,.2}}];


Bob Hanlon

---- abdou.oumaima at hotmail.com wrote: 
> Hello MathGroup,
> 
> I'm triying to show legend to all my graphics functions but still unable to do it. Hereby a sample of my code:
> 
> << Graphics`Legend`
> pp = Plot[Sin[x], {x, -Pi/2, Pi/2}, DisplayFunction -> Identity, PlotStyle -> Hue[0.6]];
> pm = Plot[Cos[x], {x, Pi/2, 3 Pi/2}, DisplayFunction -> Identity, PlotStyle -> Hue[0.8]];
> Show[{pp, pm}, DisplayFunction -> $DisplayFunction];
> ShowLegend[%, Sin, Cos]
> 
> How can I show legends or labels for all my graphics please. For Cosinus Function put "Cos (x) "  and Sinus function graphic put "Sin (x) ".
> 
> Any suggestion will veryyyyyyyyyyy welcome!
> 
> Cheers.
> Lian.
> (http://lian.blog-center.com/)
> 
> Link to the forum page for this post:
> http://www.mathematica-users.org/webMathematica/wiki/wiki.jsp?pageName=Special:Forum_ViewTopic&pid=15268#p15268
> Posted through http://www.mathematica-users.org [[postId=15268]]
> 
> 


  • Prev by Date: Re: change of variables
  • Next by Date: Re: Singularity-handling transformation employed by NIntegrate
  • Previous by thread: Graphics--Need Help: How to show legends for graphics under Show Command?
  • Next by thread: Re: Graphics--Need Help: How to show legends for graphics under Show Command?