05-26-2016 09:46 AM
Why values x axis option can be not working? I'm using it with vline:
xaxis display = (nolabel) values=(1 to 30 by 1) offsetmin = 0.03 offsetmax = 0.03 valueattrs=( size=8pt );
vline col / response=scr stat=mean limitstat=stddev;
col and scr both are numeric, so it should be working, but sadly it's not. Any ideas?
05-26-2016 10:30 AM
It may help to provide the full code, the log in case there are any messages, the actual results and a better description of the desired result. Also with graphics questions it often helps to post which version of SAS you are using as the options have changed rapidly with the last few releases.
Also "doesn't work" is bit vague. Please describe what doesn't work, do not get any output unexpected output, warning or errors?
05-26-2016 10:40 AM
Here is code that works for me. Does this give what you want? If so, there is something wrong with your data:
proc sgplot data=sashelp.class; xaxis display = (nolabel) values=(10 to 18 by 0.5) offsetmin = 0.03 offsetmax = 0.03 valueattrs=(size=8pt); vline age / response=height stat=mean limitstat=stddev; run;
05-26-2016 11:14 AM
I'm using SAS 9.3. And it works that way with scatter or series (and from your example with vline), but for some reason doesn't work with vline. Under 'doesn't work' I mean it displays on the graph only those timepoints for wich data is available instead of showing all 30 timepoints.
05-26-2016 12:44 PM
As suggested by others, It will be easier to help if you add working code with sample data.
That said, SCATTER, SERIES treat numeric data is interval. VLINE treats numeric data as DISCRETE. Only the values in the data will show up on the axis (like a VBAR). Also, there will not be any ordinal placement as these are treated merely as characters. You should use VLINE only for discrete data like a VBAR.