BookmarkSubscribeRSS Feed
AKNess
Calcite | Level 5

I'm working on creating a scatter plot that evaluates different offices on a shared score. There are 16 office and I would like to display all providers and highlight a single office at a time in a different color. For example, I would like to highlight the providers at office 1 in red and leave the other providers at the rest of the offices in blue. Taking this one step further, I would also like to highlight a single provider in the highlighted office in another color. So provider 1 in office 1 would be yellow, the other providers at office 1 would be red and all others would be blue. Is this possible to do using proc sgscatter?

5 REPLIES 5
Reeza
Super User

Yes its possible, I generally go with SGPLOT instead, but doubt it matters.

So at the end you'll want 16 plots?

AKNess
Calcite | Level 5

I think I will export them to a PDF and have 16 different graphs. I may have as many as 80 though if I single out providers among offices.

Reeza
Super User

Assuming you'd still want to differentiate other providers out by shape perhaps? Or just a single colour for all remaining providers?

Can you post sample data?

AKNess
Calcite | Level 5

A single color will do. Here is some sample data:

PG data.jpg

Jay54
Meteorite | Level 14

Better to go with SGPLOT procedure with SCATTER statement.  If you have SAS 9.3, then you can use a DAttrMap to get specific colors.

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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
  • 5 replies
  • 1750 views
  • 6 likes
  • 3 in conversation