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.
Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.
Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.
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.