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-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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