Sample 24938: Display unevenly spaced horizontal axis values
goptions reset=all cback=white border;
data a;
input xvar yvar;
datalines;
-9 90
-6 60
-3 30
0 0
1 10
2 20
3 30
4 40
6 60
8 80
12 120
;
data anno;
length function $8;
retain xsys '2' ysys '3' color 'black' when 'a';
set a;
function='move'; x=xvar; y=20; output;
function='draw'; x=xvar; y=17; output;
function='label'; x=xvar; y=13; text=left(put(xvar,3.)); output;
run;
symbol1 i=j c=blue;
axis1 value=(c=white) major=(c=white) minor=none
order=(-9 to 12 by 1) origin=(,20)pct;
proc gplot data=a;
plot yvar*xvar / haxis=axis1 anno=anno;
title1 h=5 pct 'Uneven Axis';
run;
quit;
This sample program uses the ANNOTATE facilty to create an horizontal axis that has unevenly spaced tickmarks on a GPLOT.
| Type: | Sample |
| Topic: | SAS Reference ==> Procedures ==> GPLOT Query and Reporting ==> Creating Reports ==> Graphical ==> Graph Elements ==> Axis
|
| Date Modified: | 2005-08-31 03:03:22 |
| Date Created: | 2004-11-11 11:08:03 |
Operating System and Release Information
| SAS System | SAS/GRAPH | All | n/a | n/a |