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: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
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.

SAS Training: Just a Click Away

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

Browse our catalog!

Discussion stats
  • 1 reply
  • 365 views
  • 0 likes
  • 1 in conversation