0

How do I set each category of values on the x-axis not to overlap?(cen-con-lib)

Also, I want to change the color of each category (e.g., assigning con to red) How can I change it? enter image description here `

## Visualization
STM_estimate %>% 
  ggplot(aes(x=covariate.value, y=estimate, color= covariate.value))+
  geom_point(size=2)+
  geom_errorbar(aes(ymin=ci.lower, ymax=ci.upper),width = .2)+ #error bar-geom_errorbar
  theme_bw()+
  scale_color_fivethirtyeight()+
  facet_grid(~topic)

`

Thank you in advance!!

  • Maybe [this](https://stackoverflow.com/questions/1330989/rotating-and-spacing-axis-labels-in-ggplot2) can help. – Rui Barradas Dec 14 '22 at 13:05
  • Thank you very much for your comment!! Thanks to you, I changed the angle of the x-axis label so that the x-axis does not overlap now. Could you give me some advice again on changing the color of the x-axis label? – Jiyoung Park Dec 14 '22 at 13:29
  • And [this one](https://stackoverflow.com/questions/38862303/customize-ggplot2-axis-labels-with-different-colors). I haven't answered because there is no data. – Rui Barradas Dec 14 '22 at 15:33

0 Answers0