LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (February 2008, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Thu, 21 Feb 2008 16:48:27 -0500
Reply-To:   Ya Huang <ya.huang@AMYLIN.COM>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   Ya Huang <ya.huang@AMYLIN.COM>
Subject:   Re: cannot get legend displayed on the graph.

If you don't have a Z variable (which means all data points are in the same group), but you still want to show the legend. You can create a dummy z vaxiable:

data class; set sashelp.class; z='All'; run;

legend1 frame position=(center inside right) label=none; proc gplot data=class; plot weight*height=z / legend=legend1; run;

On Thu, 21 Feb 2008 16:40:15 -0500, Ya Huang <ya.huang@AMYLIN.COM> wrote:

>Legend statement does not create legend, it only control how the >legend looks like. To create legend, you have to have third variable >in the plot statement: > >plot y*x=z /vaxis=.... > >where z represent different group. > >On Thu, 21 Feb 2008 13:31:08 -0800, Atal <cardinalcure@GMAIL.COM> wrote: > >>hi I am trying to get the legend on the bar chart with foll. code. but >>cannot get it displayed. there are no errors on the log. rest of the >>figure is ok. >> >>legend1 frame >> position=(center inside right) >> label=none across=1 mode=protect shape= bar(2,1); >> >>proc gplot data=box anno=box(where=(page=1)); >> plot y*x/vaxis=axis1 haxis=axis2 frame legend=legend1; >>run; >> >>can anyone pls help me with this. >>Thanks. >>Atal.


Back to: Top of message | Previous page | Main SAS-L page