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?
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?
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;
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.
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.
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.
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.