BookmarkSubscribeRSS Feed
Naruto2012
Calcite | Level 5

   I’m having a bit of a problem getting SGPLOT to display different bar colors for me in a waterfall plot.  Graphing is not a particular strength of mine but I'm not sure what to make of this message in the log:

“Once a GROUP variable is used in a categorical chart, that GROUP variable must be used in all overlaid charts.  The specified GROUP variable has been removed from the graph display.”

The code I’m using isn’t anything crazy and a search of the internet hasn’t provided me any solutions as other publications I've seen use the GROUP option to dynamically change the color of the bars

This is what I’m using:

proc sgplot data=x;

  vbar dummyid/ response=pchg group=nhlpop barwidth=.5;

  vline dummyid/ response=CR_PLOT markers markerattrs=(symbol=star size=4 color=green)

                                  lineattrs=(thickness=0);

  xaxis display=none;

  yaxis values=(-100 to 100 by 50) label='Tumor Size (% Change from Baseline)';

  title 'Waterfall Plot: Tumor Size Change Across NHL Types';

run;

NHLPOP is just a numeric field with either a 1 or 2 value.  I just want to use the default ODS colors to change the bar colors based on what NHLPOP group they belong to.

Any assistance would be greatly appreciated.

1 REPLY 1
Naruto2012
Calcite | Level 5

Almost forgot I'm using SAS 9.2.

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
  • 739 views
  • 0 likes
  • 1 in conversation