How do you use multiple attributes in the single plot?
For example, I a swimmer plot where category 1, 2, and 3 events are colored green, yellow and red, respectively. What if there is another variable I want to use to create a hatched pattern overlay?
You can put all of your maps in the same data set using different IDs:
data attrmap;
length ID $ 9 linecolor markercolor fillcolor $ 10;
input id $ value $10-30 linecolor $ markercolor $ fillcolor $;
show='ATTRMAP';
datalines;
status Complete response darkred darkred gray
status Partial response blue blue gray
stage Stage 1 darkred darkred green
stage Stage 2 black black yellow
stage Stage 3 black black orange
stage Stage 4 black black red
;
run;
Then, use the ATTRID option from each plot overlay to use the correct ID value.
Hope this helps!
This I understand - what if I want to use a different dataset variable to set another attribute? I want to keep the colors as is that works; however, if I only want certain bars to have a crosshatch pattern based on another dataset variable, how do I do that?
Sorry, I missed the cross-hatched part of your request. Assuming you're using a bar-type HIGHLOW for this, I would split the data based on this variable and overlay two HIGHLOW plots, with one of them having FILLPATTERNS enabled. You should be able to use the attrmap for coloring both overlays. Would that work for you?
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9.
Lock in the best rate now before the price increases on April 1.
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.
Ready to level-up your skills? Choose your own adventure.