I'm graphing survey data. On one survey question, no one answered "very often" -- but for consistency I want "very often" to still appear in the key for that question.
I've been successful adding an additional label ("Very Often") to the legend, but I can't figure out how to make the legend show an additional color.

The graph editor doesn't have an element key[5]:

In the following code, bar(5, color(red))doesn't appear to do anything.
catplot qid25L, recast(bar) percent asyvars stack over(all) ///
legend(position(3) cols(1) size(small) order(4 3 2 1 5 "Very Often" )) ///
b1title("") ///
bar(1, color(orange)) ///
bar(2, color(yellow)) ///
bar(3, color(green)) ///
bar(4, color(blue)) ///
bar(5, color(red)) ///
name(all, replace)
Is there a way to do this?
Thanks!
- Colleen
I've been successful adding an additional label ("Very Often") to the legend, but I can't figure out how to make the legend show an additional color.
The graph editor doesn't have an element key[5]:
In the following code, bar(5, color(red))doesn't appear to do anything.
catplot qid25L, recast(bar) percent asyvars stack over(all) ///
legend(position(3) cols(1) size(small) order(4 3 2 1 5 "Very Often" )) ///
b1title("") ///
bar(1, color(orange)) ///
bar(2, color(yellow)) ///
bar(3, color(green)) ///
bar(4, color(blue)) ///
bar(5, color(red)) ///
name(all, replace)
Is there a way to do this?
Thanks!
- Colleen
Comment