I haver never had this issue before, seems like no matter what I try, sgplot is forcing this diagonal line. I have tried sorting the data in different ways, using different yaxis, xaxis, and discreteorder options, the scatter, series, and other statements... etc. All producing the same problem.
proc sgplot data=final ;
scatter x=month_year y=rate / group=state;
yaxis type=discrete;
run;
Did you intentionally make the YAXIS to be discrete?
I tried discrete, linear, etc.
If you can't share an example of your actual data then show us the complete output for Proc Contents for the data set.
Yup, the variable was somehow read in as character. Dumb mistake, thanks all!
@montgomerybarre wrote:
Yup, the variable was somehow read in as character. Dumb mistake, thanks all!
Proc import or other "import" widget perhaps? From spreadsheet? All it takes is a very common two or more header row for a column to make character values with Import.
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!
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.