BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Cynthia99
Fluorite | Level 6

I would like to generate a waterfall plot. One vertical bar represents a subject, but I would like to use tumor type to display the tick values on the X axis. There are some same tumor types for different subjects. So if it is possible to display repeat tick values on X axis?

I tried to use the option values=('') to specify each value. but as the figure show, the bar with the same tumor type will display together. I would like to show them orderly. Very appreciate and hope for your response.

Cynthia99_0-1635419505953.png

Capture.PNG

1 ACCEPTED SOLUTION

Accepted Solutions
Cynthia99
Fluorite | Level 6

It not works. But I found that using options values= and valuesdisplay= at the same time can meet my requirement.

 

proc sgplot;

  vbarparm category=subjid response=aval;

  xaxis values=('001' '002' 003' '004' '005') valuesdisplay=('test1' 'test2' 'test1' 'test1' 'test4');

run;

 

Cynthia99_0-1635477038658.png

 

View solution in original post

4 REPLIES 4
PeterClemmensen
Tourmaline | Level 20

Show us your code please 🙂

Cynthia99
Fluorite | Level 6

Attached my code.😁

 

Cynthia99_0-1635420791395.png

 

Ksharp
Super User
Try add this option:

proc sgplot data=sashelp.class;
vbar age/response=weight;
xaxis fitpolicy=none;
run;


Cynthia99
Fluorite | Level 6

It not works. But I found that using options values= and valuesdisplay= at the same time can meet my requirement.

 

proc sgplot;

  vbarparm category=subjid response=aval;

  xaxis values=('001' '002' 003' '004' '005') valuesdisplay=('test1' 'test2' 'test1' 'test1' 'test4');

run;

 

Cynthia99_0-1635477038658.png

 

sas-innovate-wordmark-2025-midnight.png

Register Today!

Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.


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
  • 977 views
  • 2 likes
  • 3 in conversation