BookmarkSubscribeRSS Feed
lbogar314
Obsidian | Level 7

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.

2 REPLIES 2
Jay54
Meteorite | Level 14

Is your x variable discrete?  Try JITTER=UNIFORM option on the SCATTER plot statement.

https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/grstatproc/p1lcbd3lhs3t3bn1jk6d8sjt2yqx.htm#n...

lbogar314
Obsidian | Level 7

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. 

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

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!

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
  • 2 replies
  • 2658 views
  • 4 likes
  • 2 in conversation