I need help pointing out what I am doing wrong. I am trying to put a ref line in my graph.
Here is my code:
proc sgplot data=graph;
vbar date/ group=group dataskin=pressed;
xaxis label='Onset date' values = ('01Jan2017'd to '30Jun2017'd by day) display=( novalues) ;
yaxis label='Number of Cases' values = (0 to 8 by 1) ;
format date date9.;
refline '01MAR2017'd / axis=x ;
run;
Here is my data format:
SAS Output
| group | Char | 27 | |||
| date | Num | 8 | DATE9. | DATE9. | date |
When putting a reference line on a discrete axis, you must use the formatted value. In your case, the REFLINE should look like this:
refline '01Mar2017' / axis=x ;
Hope this helps!
Dan
When putting a reference line on a discrete axis, you must use the formatted value. In your case, the REFLINE should look like this:
refline '01Mar2017' / axis=x ;
Hope this helps!
Dan
Thank you it worked. I didn't realize it would be cases senstitve also.
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and save with the early bird rate—just $795!
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.
Ready to level-up your skills? Choose your own adventure.