BookmarkSubscribeRSS Feed
podarum
Quartz | Level 8

I'm doing a sgplot and the Date formet (on the x-axis) is in a YYMMP7. format (eg. 2005.04) over a period of 10 years or so..  I wish it to see the x-interval from May2010 to Aug2013, bi-annual, but instead all the values show up.. and it looks like a black block.  Thanks

Here is my code:

proc sgplot data = MS.Centract_ALL4;

where City= 'Toronto';

vbar date / response=Counts;

vline date / response=Price y2axis;

vline date / response=Orig_Price y2axis;

xaxis Values = ("01May2010"d to "01Aug2013"d by 2) Label = 'Date';

run;

1 REPLY 1
ballardw
Super User

It is probably showing as a "black block" because of many tick values overwriting each other.

Since the Date values are days offset from Jan 1, 1960 the request by 2 is probably asking for a tick every 2 days.

Try using

xaxis Values = ("01May2010"d to "01Aug2013"d ) Label = 'Date' interval=semiyear;

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

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
  • 1454 views
  • 0 likes
  • 2 in conversation