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-2024.png

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.

 

Register now!

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.

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
  • 4 replies
  • 934 views
  • 0 likes
  • 4 in conversation