Hello,
I am look to create a sgpanel. I have the date in year/mon like '2017/01'.I have data some data from 2016, but I want what is shown to begin at '2017/01' and the ticks show up by year from 2017 - 2020. How can I achieve his result? This is the code I used:
proc x11 data = causerie_t_total_mean_all noprint;
monthly additive date = date;
id district;
var mean_malaria_rate;
tables a1 d12;
output out = test_all_mal a1 = mean_malaria_rate d12 = adj;run;
title 'Trend Line Time Series for the Average Number of Malaria Cases per 1000 Population in by District';
proc sgpanel data=test_all_mal;
panelby district / novarname ;
rowaxis label='Number of malaria cases per 1000';
vline date / response=mean_malaria_rate;
vline date / response=adj markers markerattrs=(color=blue symbol='circle') lineattrs=(color=blue) legendlabel="trend cycle";
colaxis fitpolicy=thin interval=YEAR;
run;
You can use the Colaxis option VALUES=(<list goes here>) to specify the tick marks to display
So perhaps Values=('01JAN2017'd to '01JAN2020'd by year)
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.