HI,
>I would like to improve readability of the state codes on the x-axis on
>my faceted plot by region. What is the best solution?
>Attached is my current plot. R code is below:
>=======================
>ggplot(data = states_map, aes(x = variable, y =value, group= variable))+
> geom_boxplot(aes(fill=sex)) +
> scale_fill_manual(values=c("red"))+
> facet_wrap(~ region0)+
> theme_bw()+
> ylab("CMF") + xlab(" ")+
> theme(plot.title = element_text())+
> theme(legend.position="none")
I wouldn't facet them. This then gives you the full plot width for a
single x-axis. Fill the boxplots by region, maybe order them state within
region to enhance this.
But looking at your code you are filling by sex - but is there only one
level? Everything is filled with red (is the mandated red in the
scale_fill_manual re-used for both sexes? Or is there only one sex
present?).
Then you might try playing with the font size and/or rotating the labels,
but I suspect rotating won't help (state codes are only 2 chars?). See
?theme for both of these.
Ron.