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-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 1406 views
  • 4 likes
  • 2 in conversation