BookmarkSubscribeRSS Feed
deleted_user
Not applicable
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
4 REPLIES 4
GraphGuy
Meteorite | Level 14
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;
deleted_user
Not applicable
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
DanH_sas
SAS Super FREQ
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
deleted_user
Not applicable
OFFSET worked! Thanks!

Jeff

sas-innovate-white.png

Missed SAS Innovate in Orlando?

Catch the best of SAS Innovate 2025 — anytime, anywhere. Stream powerful keynotes, real-world demos, and game-changing insights from the world’s leading data and AI minds.

 

Register now

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 4 replies
  • 3357 views
  • 0 likes
  • 3 in conversation