BookmarkSubscribeRSS Feed
Wang2017
Calcite | Level 5

Can someone show me how to adjust the y-axis please. I am new to SAS and just couldn't figure out how to adjust the scale. I want the y-axis to go from 3 to 10. I used vaxis=3 to 10 by 1 but still doesn't work. Tried a bunch of other things but doesn't work. Comes out like that.


image1 2.JPG
3 REPLIES 3
PaigeMiller
Diamond | Level 26

Please tell us what PROC in SAS you are using. Also, show us your code.

--
Paige Miller
Wang2017
Calcite | Level 5

PROC gplot data = g1;
title 'Blood Glucose Level after 10 A.M Meal';
plot gl*x = subject/
haxis=-1 to 27 by 2
vaxis=3.00 to 10.00 by 1;
run;
quit;

 

The horizontal axis is adjust everytime I make an adjust to it but the vertical axis doesn't change at all.

Reeza
Super User

Can you switch to SGPLOT? It's easier to use than GPLOT in my experience, the syntax is more user friendly and you get better quality graphs.

proc sgplot data=g1;
title 'Blood Glucose Level after 10 am Meal';
scatter x=x y=gl / group = subject;

yaxis values = (-1 to 27 by 2);
xaxis values = (3 to 10 by 1);

run;quit;

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
  • 3 replies
  • 784 views
  • 0 likes
  • 3 in conversation