BookmarkSubscribeRSS Feed
pearson101
Calcite | Level 5

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;

1 REPLY 1
ballardw
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)

 

 

hackathon24-white-horiz.png

The 2025 SAS Hackathon Kicks Off on June 11!

Watch the live Hackathon Kickoff to get all the essential information about the SAS Hackathon—including how to join, how to participate, and expert tips for success.

YouTube LinkedIn

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 703 views
  • 0 likes
  • 2 in conversation