0

I am looking to recreate the attached graph, originally made in Stata. However, I am unsure about the following elements:

  • Creating individual horizontal bar graphs for Caste, Religion etc., is easy. But how do I combine them to be on the same axis in this manner?

  • How do I customise the axis labels for specific values, as shown in the attached image? For example, how do I only make "Caste group" in italics? Tweaking axis.text() under theme() seems to change everything on the axis.

stefan
  • 46,681
  • 5
  • 18
  • 35
  • 3
    In general this is possible with `ggplot2`. An easy approach would be to use faceting. However, to recreate the plot one to one requires more work including some additional data preparation steps. The easiest part is probably the different font faces which could for example be achieved via the `ggtext` package. If you need more help I would suggest to provide [a minimal reproducible example](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) including the code you tried as well as a snippet of your data or some fake data provided via `dput()`. – stefan Apr 25 '22 at 07:58

0 Answers0