BookmarkSubscribeRSS Feed
hjy50
Calcite | Level 5

Hello all,

 

I am trying to modify the axis label of a waterfall plot. As it's a waterfall plot, the original id is resort from 1, but is it possible to show the original id in the axis? It can be done with 'value' option, however what if I create multiple pages at the same time(which means I use a 'by' statement)? Can I use the original id variable(subjid)? Below is my code:

proc sgplot data=all dattrmap=attrmap;
    by cohort;
   refline -30 20 / axis=y lineattrs=(pattern=shortdash);
   vbar id / response=pchg group=avalc attrid=RESP;
   xaxis label="Subject" fitpolicy=thin;
   yaxis label="Change from baseline (%)" values=(-100 to 180 by 20);
   keylegend / location=inside down=1;
run;

Capture.PNG

1 REPLY 1
ballardw
Super User

You are really asking us to guess what "an original id" may be. Is it a variable in that data? If so which one?

 

You might consider a format and use the TICKVALUEFORMAT to reference that.

 

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
  • 1 reply
  • 721 views
  • 0 likes
  • 2 in conversation