Hi Experts,
I have a data which has 48 rows, (at times it may go higher than 48). These 48 rows are basically months of last 4 years. When I try to plot them in SAS it is not plotting more than 36 months. I could group by years and plot 12 months on x axis, but the trend needs to be continious and all months need to come in a line.
Any help would be much appreciated.
Thanks!
Arimitra Maiti
Can you show us a code snippet of your current approach? What version of SAS are you using?
SAS 4.3.
proc gplot data=trend_months;
plot fpm * month_number = yearnum_c/ overlay
cframe=white haxis=axis1 vaxis=axis2 annotate=anno_all
autovref LVREF=1 CVREF=bgr wvref=1;
format month_number dataord.
FPM &s_format;
run;
quit; The dataset month_number has all distinct month numbers from 1 to 48. It is showing fine till 36, as I am using the first letter of evcery month and then annotating. Did I confuse you? Apologies.
You might need to force 1 through 48 to appear on the axis by using the ORDER= option on the AXIS statement:
axis1 order=(1 to 48);
proc gplot data=trend_months;
plot fpm * month_number = yearnum_c/ overlay
cframe=white haxis=axis1 vaxis=axis2 annotate=anno_all
autovref LVREF=1 CVREF=bgr wvref=1;
format month_number dataord.
FPM &s_format;
run;
Many Thanks Dan. I am able to create what I intended. All my best wishes and many thanks for helping and enhancing me.
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
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.