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.
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
Still thinking about your presentation idea? The submission deadline has been extended to Friday, Nov. 14, at 11:59 p.m. ET.
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.