BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
cassylovescats
Calcite | Level 5

Hello,

 

I'm trying to make a graph where the y axis is DBP and the x-axis is SBP which I got.

 

But I need to make the symbol based on the race of the clinic data, some of the datalines are B and some are W.

 

How do I make the graph only show the numbers based on people who are labeled B?

 

Currently I'm making a graph that shows both B and W.

 

proc plot data=CLINIC;
plot DBP*SBP=RACE;
run;

 

Thank you,

I appreciate it

1 ACCEPTED SOLUTION

Accepted Solutions
ballardw
Super User

I do find it odd that someone is actually using Plot in this day and age but ..

 

proc plot data=CLINIC;
where Race='B';
plot DBP*SBP=RACE;
run;

If your actual value is longer, such as Black, then use the entire text value in the Where statement.

View solution in original post

2 REPLIES 2
ballardw
Super User

I do find it odd that someone is actually using Plot in this day and age but ..

 

proc plot data=CLINIC;
where Race='B';
plot DBP*SBP=RACE;
run;

If your actual value is longer, such as Black, then use the entire text value in the Where statement.

cassylovescats
Calcite | Level 5

Thank you so much!

 

I am learning SAS basics for school.

 

It worked exactly as needed!

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

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
  • 2 replies
  • 654 views
  • 0 likes
  • 2 in conversation