Reputation: 185
I'm creating an rcap
graph in Stata and running into issues with the x-axis labels. No matter what I try, the labels fall outside the graph.
I want to push the labels (and the CI bars) closer together - in other words, I want to narrow the gaps between CI bars (and their associated labels) so that nothing gets cut out.
And here is my code:
set scheme cleanplots
twoway rcap medicaid_lo medicaid_hi status, xlabel(1 2 3, valuelabel noticks) ytitle("") xtitle("")
Thanks in advance!
Upvotes: 0
Views: 1748
Reputation: 1103
set scheme cleanplots
input high low status
0.06 0.02 1
0.28 0.22 2
0.21 0.17 3
end
label define status 1"R" 2"NR" 3"Admin data"
label value status status
twoway rcap high low status, xlabel(1 2 3, valuelabel noticks) ytitle("") xtitle("") xscale(range(0.5 3.5))
You can also try using graphregion(margin(vlarge))
, which increases the margins around your graph to allow for space for longer x-axis labels.
Upvotes: 2