how do you change the color of the lines? thanks!
heres my code:
proc sgpanel data=work.marketing_spend_rename;
where market in ("All" "Heavy");
title "Marketing Spend";
panelby message / spacing=5 novarname LAYOUT=ROWLATTICE ROWHEADERPOS= right;
vline week / response=spend group=market ;
format week MMDDYY10.;
ROWAXIS label="Spend" ;
COLAXIS label="Weeks" FITPOLICY= rotatethin;
run;
Since you have the GROUP option, the line colors will come from style. First group value (in data) will get GraphData1, and so on. You can change the style and provide your own colors. MODSTYLE macro is an easy way to do this.
If you are using SAS 9.3, and want to assign specific colors to specific group values by name, use the DATTRMAP option in SGPLOT.
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.
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.