Similar Threads

1. Proc gplot / legend question

Hi SASor,
Suppose I run the following code:
symbol1 .....;
symbol2 .....;
symbol3 .....;
symbol4 .....;
symbol5 .....;
proc gplot data=a;
plot var1*var2/ id;
run;
quit;
If the id contents 1,2,3,4 and 5; after I ran the code I will get the graph with legend for the 5 ids with difference symbols by order 1,2,3,4 and 5 sequentially.
What I want is to re-order the legend sequence by 4,2,3,1 and 5.
Is there a way to customize the legend sequence?
Thanks,
ss df
---------------------------------
Be a PS3 game guru.
Get your game face on with the latest PS3 news and previews at Yahoo! Games.

2. Proc GPLOT - Legend Question

3. SUSPECT: SUSPECT: Proc GPLOT - Legend Question

On Wed, 1 Apr 2009 13:03:48 -0400, Siddharth Jain < XXXX@XXXXX.COM >
wrote:
>I am sorry I was not able to explain you.
>
>Variable Censor has values 0 and 1. Irrespective of that, I want to
>display 5 numbers in my legend (which are not in the dataset).
At this point, providing an example of the intended legend and details
about the numbers (are they constants, where are they held) will help.
Have you considered a FOOTNOTE statement? You could do away with the
FRAME around the legend or even the legend itself and use an ANNOTATE
dataset.
Kevin

4. SUSPECT: SUSPECT: Proc GPLOT - Legend Question

5. GPLOT legend and device questions (repost)

Original post 9/6/2005 did not propagate.
Using the Graph-N-Go, on 9.1.3 for WIN2000, generated code below I have
the following questions.
1 - The code did not build the legend statement. How do I build the
legend
so that all 3 vars (trn_nbr, cbk_nbr, vdn_nbr) are in a boxed legend
centered outside the right of the graph and each tick is on a seperate
line?
2 - The scale for the axis1 is defaulting to 10, how do I display all
values?
3 - How do I scale axis2 and axis3 to 5?
4 - Likely a new topic. When I specify the java or gif device, I
frequently get a *dll windows error message. Is this a symptom which
may require me to reload Sas 9.1.2.3 or updated device drivers?
/* BEGIN CODE */
/* Graph-N-Go SAS/Graph Code comments removed */
data temp;
attrib Day length=8 format=Z2.;
attrib TRN_NBR length=8 label="Messages" ;
attrib CBK_NBR length=8 label="Call Backs" ;
attrib VDN_NBR length=8 label="ACD Calls" ;
input Day= TRN_NBR= CBK_NBR= VDN_NBR=;
datalines;
Day=1 TRN_NBR=35 CBK_NBR=0 VDN_NBR=13
Day=2 TRN_NBR=27 CBK_NBR=0 VDN_NBR=10
Day=3 TRN_NBR=19 CBK_NBR=0 VDN_NBR=10
Day=4 TRN_NBR=45 CBK_NBR=4 VDN_NBR=17
Day=5 TRN_NBR=16 CBK_NBR=0 VDN_NBR=10
Day=8 TRN_NBR=45 CBK_NBR=1 VDN_NBR=16
Day=9 TRN_NBR=26 CBK_NBR=9 VDN_NBR=7
Day=10 TRN_NBR=12 CBK_NBR=3 VDN_NBR=3
Day=11 TRN_NBR=18 CBK_NBR=2 VDN_NBR=4
Day=12 TRN_NBR=37 CBK_NBR=1 VDN_NBR=11
Day=15 TRN_NBR=39 CBK_NBR=4 VDN_NBR=6
Day=16 TRN_NBR=30 CBK_NBR=3 VDN_NBR=12
Day=17 TRN_NBR=27 CBK_NBR=3 VDN_NBR=11
Day=18 TRN_NBR=31 CBK_NBR=1 VDN_NBR=7
Day=19 TRN_NBR=33 CBK_NBR=0 VDN_NBR=11
Day=22 TRN_NBR=32 CBK_NBR=0 VDN_NBR=15
Day=23 TRN_NBR=31 CBK_NBR=2 VDN_NBR=17
Day=24 TRN_NBR=43 CBK_NBR=0 VDN_NBR=17
Day=25 TRN_NBR=24 CBK_NBR=8 VDN_NBR=14
Day=26 TRN_NBR=30 CBK_NBR=0 VDN_NBR=12
Day=29 TRN_NBR=30 CBK_NBR=1 VDN_NBR=10
Day=30 TRN_NBR=32 CBK_NBR=3 VDN_NBR=15
Day=31 TRN_NBR=36 CBK_NBR=8 VDN_NBR=12
;
run;
%let path = %sysfunc(pathname(work))\;
/* Begin ODS output */
ods listing close;
ods html file="&path.Sample.htm" (title="Graph-N-Go Output")
gpath="&path" gtitle gfootnote style=minimal;
/* Set the SAS/Graph options */
goptions reset=all border nodash
ctext=CX000000 ftext="MS Sans Serif" htext=8 pt
colors=(CX0000FF CXFF0000 CX008080 CX00FF00
CXFF00FF CXFFFF00 CX00FFFF CX800000
CX008000 CX800080 CX000080 CX808000
CXFFFFFF CX808080 CXC0C0C0 CX000000);
/* Set the SAS/Graph device driver */
* goptions device=JAVA xpixels=761 ypixels=489;
/* AXIS1 describes the X-axis (horizontal) */
axis1 minor=none label=("Day") color=CX000000 offset=(5pct,5pct) ;
/* AXIS2 describes the left Y-axis (vertical) */
axis2 minor=none label=none color=CX000000 offset=(5pct,5pct);
/* AXIS3 describes the right Y-axis (vertical) */
axis3 minor=none label=none color=CX000000 offset=(5pct,5pct);
/* Each SYMBOL statement specifies style, size and */
/* color for markers and join lines for an overlay */
symbol1 line=1 width=1 cv=CX0000FF ci=CX0000FF value=Dot interpol=Join
height=6 pt;
symbol2 line=33 width=1 cv=CX008080 ci=CX008080 value=Triangle
interpol=Join height=6 pt;
symbol3 line=20 width=1 cv=CXFF0000 ci=CXFF0000 value=Square
interpol=Join
height=6 pt;
proc gplot data=temp;
plot TRN_NBR*DAY=1 / nolegend
haxis=axis1 vaxis=axis2
cframe=CXFFFFFF caxis=CX000000;
plot2 VDN_NBR*DAY=2 CBK_NBR*DAY=3 / overlay legend=legend1
vaxis=axis3;
run;
quit;
/* Reset all graphics options */
goptions reset=all;
/* End ODS output */
ods html close;
ods listing;
/* END CODE */

6. GPLOT legend and device questions

7. gplot legend device type special characters question

Hi all,
i am trying to put the special characters alpha and beta in the legend of
my equation.....but it is coming as a blank and the sas log states that
NOTE: A hardware font was specified that is not available on the device
WIN. If the font is available on the hardcopy device, it will be utilized
if/when the previewed graph is printed.
i am using windows sas 8.2......
could someone point me in the right way....have copied my whole gplot code
below...
thanks
hari.....
******special characters for equation;
data _null_ ;
s1 = byte(222) ;
s2 = byte(223) ;
call symput('alpa',s1);
call symput('beta',s2);
put s1= s2= ;
run ;
goptions reset=global gunit=pct border cback=white
ftitle=swissb ftext=swiss htitle=4 htext=2 gsfmode=replace ;
symbol1 c=black v=dot w=4 I=none L=4 height=2;
symbol2 c=black w=4 i=r height=2;
axis1 order=(0 to 0.006 by 0.0015) offset=(2,2)
label=("xxx")
major=(height=3) minor=none
width=3;
axis2 order=(2 to 6.5 by 0.5) offset=(0,0)
label=("yyy")
major=(height=2) minor=none
width=3;
legend1 label=(H=0.15 in "Ln y = &alpa. + &beta.*ln(x)" POSITION=(bottom
right))
position=(bottom right inside)
offset=(1 , 5)
mode=share;
%inc gtitles;
proc gplot data=stat gout= &mrlstref ;
plot y*x y1*x / overlay
haxis=axis1 hminor=4 legend=legend1
vaxis=axis2 vminor=1 noframe;
run;
quit;

8. SAS/GRAPH: legend on PROC GPLOT truncates label