Hello,
I created this time series graph with concentration on my left Y axis and Cases on my Right Y axis.
I used "SCATTER" for my concentration and 'LOESS" for my cases.
So I have 2 questions.
1) How can I get change my legend from saying "LOESS" to "Cases"?
2) Any suggestions on how to make this look cleaner and nicer to look at?
Below is my code and my current graph. Thank you.
proc sgplot data=WWCC;
SCATTER x=date y=concentration;
LOESS x=date y=cases / Y2AXIS lineattrs=(pattern=Solid color=Red);
Run;
data wwcc;
set sashelp.stocks;
if stock='IBM';
label open='concentration' close='Cases';
run;
proc sgplot data=WWCC;
SCATTER x=date y=open;
LOESS x=date y=close / Y2AXIS lineattrs=(pattern=Solid color=Red) legendlabel='Cases';
yaxis type=log;
y2axis type=log;
Run;
Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.
If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website.
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.