Hi, I'm running SGPLOTS and although the x-asix is the correct one, it doesn't show up as expected...
My code is
proc sgplot data = Data;
vline Date / response = NHPI y2axis;
xaxis values=('01Jan2010'd to '31Dec11'd by qtr);
xaxis Label = 'Date' Grid Values = (0 to 5 by 1);
refline '31Dec11'd / axis=x;
run;
But the X-Axis still shows up crammed and not readable (from the Jan2000 to Dec2011, rather then the time span specified)... any ideas? Thanks
Add TYPE=time on the first xaxis stmt and remove the second xaxis stmt.
xaxis type=time values=('01Jan2010'd to '31Dec11'd by qtr);
Hi:
Is it an accident that you have 2 XAXIS statements in your code? Each XAXIS statement has a VALUES= option.
cynthia
Thanks Cynthia, I removed the second xaxis line and got the same results..
Add TYPE=time on the first xaxis stmt and remove the second xaxis stmt.
xaxis type=time values=('01Jan2010'd to '31Dec11'd by qtr);
Thanks Sanjay.. works fine..
What line could I add if I wanted to show another variable as a secondary Y-Axis but on a different scale.. so have a left and right scale for each of the 2 vars? Thanks
See my recent article on this topic at Graphically Speaking
Great stuff.. Thank you.
Hey, what's the best way to show a correlation between Price and say Unemployement rate on a graph? I'm thinking a 2-Y axis chart?
Thanks,
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
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.