BookmarkSubscribeRSS Feed
Iryna1
Fluorite | Level 6

Hi,

 

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?

4 REPLIES 4
ballardw
Super User

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?

Rick_SAS
SAS Super FREQ

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;
 
Iryna1
Fluorite | Level 6

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. 

Jay54
Meteorite | Level 14

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.

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 4 replies
  • 1258 views
  • 0 likes
  • 4 in conversation