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: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 3 replies
  • 563 views
  • 4 likes
  • 3 in conversation