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

Use Multiple Colors in a Graph

I am attempting to make a &quot;waterfall&quot; plot with the NEEDLE interpolation in PROC GPLOT.  My plot is divided into two different groups.  I wanted the positive group to be blue and the negative group to be red.  Here is what I have attempted:

axis1 label=(angle=90 'Best Percent Change in Lesion Size') order=(-100 to 150 by 50) minor=(n=4);

axis2 label=(' ') value=none major=none minor=none;

proc gplot data=waterfall;

plot ploty1*n ploty2*n / overlay vaxis=axis1 haxis=axis2;

symbol1 interpol=Needle value=none width=4 color=blue;

symbol2 interpol=Needle value=none width=4 color=red;

run;

I am not at all familiar with annotations, but I am sure I could do something with that.  I just have no idea where to start.

This is not my full data, but here is an idea of how it looks:

brpercentposnegnploty1ploty2
2.564Positive12.564
2.083Positive22.083
1.333Positive31.333
0Positive40
-5.263Positive5-.263
-30Positive6-30
-31.429Positive7-31.429
-36.842Positive8-36.842
-40Positive9-40
-50Positive10-50
150Negative11150
142.857Negative12142.857
78.152Negative1378.152
58.065Negative1458.065
52.174Negative1552.174
-3.704Negative16-3.704
-4Negative17-4
-4.762Negative18-4.762
-7.143Negative19-7.143
-18.75Negative20-18.75
1 ACCEPTED SOLUTION

Accepted Solutions
Meteorite | Level 14

Use Multiple Colors in a Graph

Here's an example where I've used Proc Gchart and Annotate to create a waterfall chart - I think you can re-use this technique to get the graph you're wanting...

http://robslink.com/SAS/democd41/waterfall_anno.htm

http://robslink.com/SAS/democd41/waterfall_anno_info.htm

1 REPLY 1
Meteorite | Level 14

Use Multiple Colors in a Graph

Here's an example where I've used Proc Gchart and Annotate to create a waterfall chart - I think you can re-use this technique to get the graph you're wanting...

http://robslink.com/SAS/democd41/waterfall_anno.htm

http://robslink.com/SAS/democd41/waterfall_anno_info.htm

Discussion stats
• 1 reply
• 728 views
• 0 likes
• 2 in conversation