Data visualization with SAS programming

Axis starting at more than zero.

Reply
N/A
Posts: 0

Axis starting at more than zero.

I'm using GPlot to create two plots. I'd like the graph to start above the (0,0) origin. For example, instead of the vertical axis running from 0 to 100, I'd like it to run only from 50 to 100. Is there a way to do this? Thanks!

Jeff
SAS Employee
Posts: 980

Re: Axis starting at more than zero.

You can use an axis statement with gplot, to specify the exact range you want.

(Be careful - you might hard-code a range that's smaller than your data!)


axis1 order=(70 to 120 by 10);

proc gplot data=sashelp.class;
plot weight*height / vaxis=axis1;
run;
N/A
Posts: 0

Re: Axis starting at more than zero.

Here's the code for one of my axes.

axis3 value=(color=black font="Helvetica" height=7pt)
label = none
order=(.1 1 10 100 1000)
logbase=10
logstyle=expand
major=none
minor=none;

What I'm getting is the .1 line is above the y axis instead of in the same place. Is there a way for the Y axis to be the .1 line?

Thanks!
Jeff
SAS Super FREQ
Posts: 925

Re: Axis starting at more than zero.

Try using offset=(0,) to see if you get what you want. You may get bleed-over of your markers on the axis, though.

Dan
N/A
Posts: 0

Re: Axis starting at more than zero.

OFFSET worked! Thanks!

Jeff
Ask a Question
Discussion stats
  • 4 replies
  • 268 views
  • 0 likes
  • 3 in conversation