BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
montgomerybarre
Obsidian | Level 7

montgomerybarre_0-1702079519957.png

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;

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
6 REPLIES 6
DanH_sas
SAS Super FREQ

Did you intentionally make the YAXIS to be discrete?

ballardw
Super User

If you can't share an example of your actual data then show us the complete output for Proc Contents for the data set.

Ksharp
Super User
Make sure your variable "rate " is NUMERIC tpye ,not CHARACTER.
montgomerybarre
Obsidian | Level 7

Yup, the variable was somehow read in as character. Dumb mistake, thanks all!

ballardw
Super User

@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.

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
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
  • 6 replies
  • 1049 views
  • 5 likes
  • 4 in conversation