BookmarkSubscribeRSS Feed
changxuosu
Quartz | Level 8

proc sgplot data=mydata;

series x=datey=dollar / lineattrs = (thickness=2);

 

xaxis display=(nolabel) valuesformat=MMYYS. interval=month valueattrs= (size=8);

yaxis display=(nolabel);

run;

 

 

Dear SAS community,

I have a dataset mydata, I want to plot date on x axis and dollar on y axis. I used the code in the above, the problem is that using that code, the number of ticks on xaxis is too small. It's too thinly displayed. the interval 2 years.

I changed my options by using "interval=month" but it doesn't change the output plot.

Anyone has any idea? Appreciate any suggestions.

A newbie in sgplot struggling... thanks!

2 REPLIES 2
DanH_sas
SAS Super FREQ

Based on your description, my guess is that INTERVAL=MONTH would be too dense to fit. I might would try INTERVAL=YEAR and MINORINTERVAL=MONTH to get that level of detail.

 

Hope this helps!

Dan

changxuosu
Quartz | Level 8
Thank you Dan! Appreciate your input!

SAS INNOVATE 2024

Innovate_SAS_Blue.png

Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. 

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

Get the $99 certification deal.jpg

 

 

Back in the Classroom!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 536 views
  • 3 likes
  • 2 in conversation