BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
ankan1987
Fluorite | Level 6

Hi,

 

Currently my data set is :

 

DT_APPproduct categoryapps
Jan2021Cards12363
Jan2021Lending6716
Feb2021Cards13217
Feb2021Lending7030
Mar2021Cards17400
Mar2021Lending8475
Apr2021Cards15488
Apr2021Lending7958
May2021Cards14316
May2021Lending8000
Jun2021Cards15559
Jun2021Lending8508
Jul2021Cards14255
Jul2021Lending9027
Aug2021Cards13901
Aug2021Lending12557
Sep2021Cards12515
Sep2021Lending11630
Oct2021Cards11295
Oct2021Lending10435
Nov2021Cards11416
Nov2021Lending8904
Dec2021Cards10424
Dec2021Lending8685
Jan2022Cards10836
Jan2022Lending8520

 

and after running sgplot with this code  :

 

proc sgplot data=prod_cat_WITH_DM_Apps_Graph1;
title justify=center "test" justify=center;
styleattrs datacontrastcolors=(blue green orange brown);
series x=dt_app y=apps / group=product_category lineattrs=(thickness=2 pattern=solid) legendlabel="Actual+Forecast";
yaxis grid label="apps";
xaxis label="Application Month" valuesformat=monyy.;


run;

 

I am getting output as :

ankan1987_1-1641894418768.png

 

 

Question: Why am I getting Mar22 in the horizontal axis when i don't have Mar22 in the dataset.

 

 

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
PaigeMiller
Diamond | Level 26

The axis is chosen so that it extends past the highest value in the data and is consistently spaced (every 2 months). If you want different axes, you change the options in the XAXIS statement. In this case, you could probably use the MAX= option (and possibly other options as well).

--
Paige Miller

View solution in original post

2 REPLIES 2
PaigeMiller
Diamond | Level 26

The axis is chosen so that it extends past the highest value in the data and is consistently spaced (every 2 months). If you want different axes, you change the options in the XAXIS statement. In this case, you could probably use the MAX= option (and possibly other options as well).

--
Paige Miller
ankan1987
Fluorite | Level 6
Thanks for the tip! Setting max= latest date worked

sas-innovate-wordmark-2025-midnight.png

Register Today!

Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.


Register now!

Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 2 replies
  • 583 views
  • 0 likes
  • 2 in conversation