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

I'm doing a scatter plot with only two discrete categories on the X axis.  I would like to use two different symbols for each category.  I'm used to using a different symbol per  third grouping, such as sex, but how can I use a different symbol per category?  It seems too simple to do, ha ha.

 

Here's what I want it to look like:

 

davehalltwp_0-1722276222424.png

 

1 ACCEPTED SOLUTION

Accepted Solutions
PaigeMiller
Diamond | Level 26

Example:

 

ods graphics/attrpriority=none;
proc sgplot data=sashelp.class;
    styleattrs datasymbols=(asterisk circle diamond triangle plus x);
    scatter x=age y=weight/group=age grouporder=ascending;
run;
--
Paige Miller

View solution in original post

3 REPLIES 3
PaigeMiller
Diamond | Level 26

Example:

 

ods graphics/attrpriority=none;
proc sgplot data=sashelp.class;
    styleattrs datasymbols=(asterisk circle diamond triangle plus x);
    scatter x=age y=weight/group=age grouporder=ascending;
run;
--
Paige Miller
DanH_sas
SAS Super FREQ

The ATTRPRIORITY=NONE option is the key here. Just specifying that option will get you different symbols from the active style. The list of symbols in the procedure is not required.

davehalltwp
Quartz | Level 8

Thank you, Paige.  Much better now.

 

Dan, thank you as well.  It turned out that I had commented out the ODS GRAPHICS line, which didn't have the ATTRPRIORITY setting anyway.

 

As usual, I've learned from you all...

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
  • 3 replies
  • 490 views
  • 4 likes
  • 3 in conversation