☑ This topic is solved.
Need further help from the community? Please
sign in and ask a new question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Posted 07-29-2024 02:04 PM
(965 views)
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:
1 ACCEPTED SOLUTION
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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
Paige Miller
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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
Paige Miller
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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...