My code is as follows:
proc sgplot data = demo;
styleattrs datacontrastcolors=(G R Olive Steel Gold Cyan)
datasymbols=(circlefilled);
scatter x = ss y = mm / group=en;
xaxis label= "SS" values = (600 to 900 by 25);
yaxis label= "MM" values = (-500 to 3000 by 500);
run;
This is causing my plot to remove all of the points that are not specified in the values statement. How do I avoid overlap on the x-axis but still include all of the points? I'm not sure what I am doing wrong.
Is your x variable discrete? Try JITTER=UNIFORM option on the SCATTER plot statement.
I just figured out my (very silly) mistake and went to remove this post but it already had a reply! Thank you so much. My x variable wasn't numeric- I don't know why I didn't think to check that first. I fixed that and all is well.
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 25. Read more here about why you should contribute and what is in it for you!
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.