BookmarkSubscribeRSS Feed
purpleclothlady
Pyrite | Level 9

Hi all:

I have this question:

-How to display x axis max scale by subject.? 

thank you,

purpleclothlady

/*axis1 order=(1 to 150 by 7) - max value of x axis will change by subject. eg
001 max is 150, 002 max is 60 , 003 max is 90*/ 
axis1 order=(1 to 150 by 7) label= (h=1.2 "Time(Day)" justify=center color=black) ;

axis2 offset=(1,1)
order=(0 to 100 by 10) label=( angle=90  h=1 color=blue ""result");

legend1 label=none value=(color=black height=1.2 "result")
position=(bottom center outside);

proc gplot data=rpt;
plot _result*day  /  legend=legend1
haxis=axis1
vaxis=axis2 ;
by subjid;
run;
quit;
5 REPLIES 5
purpleclothlady
Pyrite | Level 9

Hi all:

I have this question:

-How to display x axis max scale by subject.? 

thank you,

purpleclothlady

/*axis1 order=(1 to 150 by 7) - max value of x axis will change by subject. eg
001 max is 150, 002 max is 60 , 003 max is 90*/ 
axis1 order=(1 to 150 by 7) label= (h=1.2 "Time(Day)" justify=center color=black) ;

axis2 offset=(1,1)
order=(0 to 100 by 10) label=( angle=90  h=1 color=blue ""result");

legend1 label=none value=(color=black height=1.2 "result")
position=(bottom center outside);

proc gplot data=rpt;
plot _result*day  /  legend=legend1
haxis=axis1
vaxis=axis2 ;
by subjid;
run;
quit;
purpleclothlady
Pyrite | Level 9
Hi Kurt: I mistakenly posted twice. thanks for reminder.
DanH_sas
SAS Super FREQ

Add the UNIFORM option the PROC GPLOT procedure statement. It should give you uniform axes by subject.

purpleclothlady
Pyrite | Level 9

@DanH_sas :

The question is How to show Different x axis scale by subject.  

eg. subject 101  max x axis =100

subject 102 max x axis=15

subject 103 max x axis=40

 

thanks for helping,

purple

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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
  • 5 replies
  • 1536 views
  • 1 like
  • 3 in conversation