BookmarkSubscribeRSS Feed
TwanMandersSDCC
Calcite | Level 5

Having a graph with bars for every month over a 4 year period there's too many values on the x-axis (sas dates) so i want to decrease the number of values on the x axis but still showing all bars on the charts. I tried this one in a proc template. But i still get alle months shown on the x-axis. Is there a way of doing it?

 

layout overlay / xaxisopts=( label=('Status måned')
griddisplay=on linearopts=( tickvaluelist=('01JAN2018'd '01JAN2019'd '01JAN2020'd '01JAN2021'd))

1 REPLY 1
ChrisNZ
Tourmaline | Level 20

Please show your full code,and paste it using the appropriate icon.

 

One way:

 proc sgplot data=SASHELP.CITIDAY;            
   where DATE<'03JAN1988'd;
   vbarparm category=DATE response=DSIJPND ;
   xaxis values=('01JAN1988'd '02JAN1988'd '03JAN1988'd ) valuesdisplay=('01Jan' ' ' '01Feb' ) ;
run ;

ChrisNZ_0-1614901849889.png

 

 

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

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

View all other training opportunities.

Discussion stats
  • 1 reply
  • 857 views
  • 0 likes
  • 2 in conversation