BookmarkSubscribeRSS Feed
eemrun
Obsidian | Level 7

I am trying to plot a chart with multiple scenarios. The code currently used to display it is as follows:

 

title 'Unemployment Rate Scenario';
proc sgplot data=ifrs_econ_scnr;
   series x=ReportingDate y=Raw_UMP/group = Iteration;
   format ReportingDate yyqc4.;
   yaxis label= 'Unemployment Rate';
   refline '30Jun2017'd / axis = x;
 run;

Capture.JPG

 

The chart is grouped by 'Iteration' and I wanted to know if I could highlight 1 particular iteration (e.g. 1) in the plot and make it a bit more prominent (e.g. change weight of the line). Any ideas?

2 REPLIES 2
WarrenKuhfeld
Rhodochrosite | Level 12

In a DATA step, before SGPLOT, create a new variable for just iteration 1.  Then add a second SERIES statement after the first that just displays that iteration.  Use options to make the line heavier or change the color or do what it takes to make it more prominent.

Reeza
Super User

Make the first series black, with a heavier line and the remains as light grey. In fact, it'll probably end up similar to a confidence/prediction interval/band, which is another option to consider. Summarize the data ahead of time to get the max/min to set up prediction intervals and use that to define a band instead. 

 

SGPLOT has examples in the documentation of plotting a line series with banded intervals. 

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!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

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