BookmarkSubscribeRSS Feed
LB1993
Fluorite | Level 6

I would like to specify the X-axis values for the figure in the code below, but for some reason it doesn't work and provides an X-axis tick increment of 40 instead of 10. Any idea what I'm doing wrong?

 

PROC SGPLOT DATA = test;
SCATTER Y = food_group X = mean_diff / GROUP = ses_com GROUPDISPLAY=CLUSTER CLUSTERWIDTH = 0.7
Xerrorlower = CI_diffLower Xerrorupper = CI_diffUpper;
XAXIS
VALUES=(-200 to 200 by 10)
LABEL = "Difference in mean (mean and 95% CI means)"
LABELATTRS = (size = 8pt family = "Times New Roman Uni")
VALUEATTRS = (size = 8pt family = "Times New Roman Uni")
;
YAXIS
LABEL = " " /*A single space as x-axis labels with big font size to produce enoug space*/
LABELATTRS = (size = 8pt family = "Times New Roman Uni") /*x-axis label font definition*/
VALUEATTRS = (size = 8pt family = "Times New Roman Uni")
GRID
;
REFLINE 0 /
AXIS = X
LINEATTRS =(THICKNESS = 1 COLOR = DAGRB pattern = shortdash)
;
KEYLEGEND /
NOBORDER
TITLE = ""
VALUEATTRS = (size = 8pt family = "Times New Roman Uni") /*Legend font definition*/
;
TITLE " ";
RUN;

1 REPLY 1
LB1993
Fluorite | Level 6

Solution found:  I had to increase the size of the plot.

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 16. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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
  • 1 reply
  • 257 views
  • 0 likes
  • 1 in conversation