☑ 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-12-2022 06:06 AM
(592 views)
I want to overlay 2 histograms (age in men and women) for 2 groups (rural vs. urban population).
My code below works but the histogram bars are in reversed colors - in 1 figure, women are red, and in the other one, blue. How can I assign the same colors in both figures?
proc sgplot data = data;
histogram AGE / group = SEX;
by URBAN;
RUN;
1 ACCEPTED SOLUTION
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
1 REPLY 1
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Try sorting
proc sort data=data;
by urban sex;
run;
--
Paige Miller
Paige Miller