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;
Solution found: I had to increase the size of the plot.
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
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.
Ready to level-up your skills? Choose your own adventure.