Hello,
I am trying to skip certain dates on the x-axis, see code below.
proc sgplot data=finaldata;
vbar date;
xaxis label='Event date' values=('10Dec2018'd to '01Jun2019'd by week);
yaxis label='Number of events' values=(0 to 6 by 2) offsetmin=0;
run;
Date has values:
10Dec2018
02Feb2019
05Feb2019
09Feb2019
22Feb2019
01Mar2019
11Mar2019
22May2019
25May2019
I want to skip the months with no values but still space it out by specified ticks
thanks in advance
Not really understand what you need.
Try range= option.
xaxis label='Event date' range=('10Dec2018'd - '01Jan2019'd , '01May2019'd- '01Jun2019'd);
So you want one tick per date in the data, evenly spaced?
I didn't know I could specify multiple ranges values as above. Thanks
Not really understand what you need.
Try range= option.
xaxis label='Event date' range=('10Dec2018'd - '01Jan2019'd , '01May2019'd- '01Jun2019'd);
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
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.