BookmarkSubscribeRSS Feed
Arimitra
Calcite | Level 5

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

4 REPLIES 4
DanH_sas
SAS Super FREQ

Can you show us a code snippet of your current approach? What version of SAS are you using?

Arimitra
Calcite | Level 5

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.

DanH_sas
SAS Super FREQ

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;

Arimitra
Calcite | Level 5

Many Thanks Dan. I am able to create what I intended. All my best wishes and many thanks for helping and enhancing me.

Catch up on SAS Innovate 2026

Dive into keynotes, announcements and breakthroughs on demand.

Explore 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.

SAS Training: Just a Click Away

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

Browse our catalog!

Discussion stats
  • 4 replies
  • 2588 views
  • 4 likes
  • 2 in conversation