sas >> Axis for SAS Graph

by Richard A. DeVenezia » Wed, 28 Apr 2004 22:39:29 GMT

David Yeates wrote:
> Hi All,
> The final step in one of my macros is to merge several datasets and
> use proc GPLOT to create a multi-variable chart.
> It works fine but I would like to constrain the y-axis values to start
> at 0 (zero) even if that value does not exist in any of the datasets.
> Before I start changing my macro code so that I can use the order
> statement as in order(0 to &maxval by &interval), for example does
> anyone have a crafty way to make this happen.
> Regards
> David

Consider the HZERO PLOT option.

data xy;
do x = 100 to 200;
y = sin (x/200*constant('pi'));

symbol1 i=join v=point;

* compare and contrast;
proc gplot data=xy;
plot y*x;
plot y*x / hzero;

Richard A. DeVenezia

sas >> Axis for SAS Graph

by RBurbidge » Wed, 28 Apr 2004 22:47:26 GMT

> It works fine but I would like to constrain the y-axis values to start

vzero in this case

-----Original Message-----
From: SAS(r) Discussion [mailto: XXXX@XXXXX.COM ]On Behalf Of
Richard A. DeVenezia
Sent: 28 April 2004 15:39
Subject: Re: Axis for SAS Graph

Consider the HZERO PLOT option.

data xy;
do x = 100 to 200;
y = sin (x/200*constant('pi'));

symbol1 i=join v=point;

* compare and contrast;
proc gplot data=xy;
plot y*x;
plot y*x / hzero;

Richard A. DeVenezia

Privileged/Confidential Information may be contained in this message.
If you are not the addressee indicated in the message (or responsible
for the delivery of the message to such person), you may not copy
or deliver this message to anyone.
In such case, you should destroy this message and kindly notify the
sender by reply Email. Please advise immediately if you or your employer
does not consent to Internet Email for messages of this kind.
Opinions, conclusions and other information in this message that do not
relate to the official business of PHD Limited or its
Group/Associated Companies shall be understood as neither given nor
endorsed by them.
PHD Limited
Registered in England.
Registered Number: 2423952
Registered Office: The Telephone Exchange, 5 North Crescent, Chenies Street, London, WC1E 7PH
Telephone: 020 7446 0555
Fax: 020 7446 7100

Similar Threads

1. Axis Statement in SAS/Graph

2. is there length limitation for value on the AXIS, SAS/Graph

Hi, Sas-L,

I got the follwoing warning message in the log window after run the proc

WARNING: The values of countyGP have been truncated to 32 characters.

the varaible countygp has four levels. I assoicated an user-defined format
with it.

the code is here:

axis2 offset=(1in) split=","
      label=( F=SWISSxb H=1.3  c=black "RESIDENCE")
        value=(h=0.8 F=SWISSxb );
proc gchart data=tumor gout=d1.page7;
 vbar pt_countygp/discrete raxis=axis1 MAXIS=AXIS2 annotate=labels
              midpoints=1 2 3 4 patternid=midpoint
              NOframe type=pct  WIDTH=6 SPAce=6
               format countygp ctyfmt.;

I tried several things like changing offset ,decreasing the font size,
increasing the group space, etc with no luck.

inceIs there any way I can display the whole thing on the axis without

Thanks in advance!


3. SAS/Graph Axis Question

4. SAS Graph - Odd Axis Labels problems

     I am using a PROC GPLOT to generate a bar-line chart in a report.
The x-axis comprises SAS dates - data points for 13 months. I want the
months to appear in the label on a quarterly basis, and am specifying
the appropriate interval in the AXIS statement. Strangely, the code
prints the quarterly axes labels correctly for one month while in the
next month it prints it at every half year.
     I did a diff on the two versions of the code for each month, and
both of them are the same. Is anybody aware of any reason why this may
happen? Thanks in advance.


Code -

(In the first instance which works, t12m_start gets resolved to MAR07
and reporting month to MAR08 while in the second case it gets resolved
to APR07 and APR08 respectively)

axis1 label=none offset=(0,2) order=(0 to 0.2 by .04)
      major=(h=-1) minor=none value=(h=4);
axis2 label=none offset=(0,2) order=(0 to 0.16 by .04) major=none
minor=none value=none
axis3 label=none offset=(5,5) order=("&t12m_start"d to
"&reporting_month"d by quarter)
      value=(color=black height=5 angle=55 rotate=0)
          major=(width=3) minor=none length=80pct;

symbol1 interpol=needle value=none width=20 color=&firstbarclr;
symbol2 interpol=spline value=none width=2 height=1 ;
symbol3 interpol=spline value=none width=2 height=1 ;
symbol4 interpol=spline value=none width=2 height=1 ;

legend1 label=none shape=symbol(4,2) value=(h=4 'Loss' 'Costs' 'Revenue')
        /*position=(bottom center outside)*/ origin=(30pct,);

5. SAS/Graph Axis & Label

6. SAS GRAPHS - 2 horizontal axis

I'd like to draw 2 graphs that overlay , an I want each to have his
own scale ( that means I'll have the first graph (NOX) in red - in one
scale- its axis will be on the left , and the other one (O3)- in black
in a different scale its axis will be on the right.I'd like to have
something like :
axis3 order = (0 to 100 by 5)- that will be horizontal as well.

my syntax so for was :

title "Daily Mean  of O3 [ppb] Vs NOX [ppb] &name. station (&stat.)";
/*O3*/symbol1 i=j v=dot c=black h=0.08 cm w=0.5;
/*NOX*/symbol2 i=j v=dot c=red   h=0.08 cm w=0.5;
axis1 order=('1Jan2000'd to '1Jan2005'd by year)
      label=(f=swiss h=0.5 cm  'date') minor=none;
axis2 order = (0 to 350 by 10);

proc gplot data=data.memuza_yomi;
plot O3_mean*date NOX_mean*date  /overlay vaxis = axis2 haxis=axis1
where stat_id=&stat.;
run; quit;

Thanks in advance,

7. Graph: Axis position

8. moving axis to middle of graph

Greetings -

I'm using gplot to generate a graph where the vertical axis will go from
-50 to 50.  I've been trying to figure out a way to plot the horizonatal
axis in the middle of the graph, i.e., at zero.

It would be simple to use the annotate macros to draw the axis at zero,
but then I can't figure out how to suppress the axis at -50.

Would anyone have a suggestion how to move the bottom axis with a minimum
number of keystrokes?

Many thanks in advance - Deb