BookmarkSubscribeRSS Feed
Calcite | Level 5


             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;

Super User

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)





Time is running out to save with the early bird rate. Register by Friday, March 1 for just $695 - $100 off the standard rate.


Check out the agenda and get ready for a jam-packed event featuring workshops, super demos, breakout sessions, roundtables, inspiring keynotes and incredible networking events. 


Register now!

How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 1 reply
  • 2 in conversation