In this simple MWE, I create a simple chart element of a female figure, and then I apply it to a barchart, with the following code (note: womfig = this little stick figure here).
bd = BarChart[{0.76, 8.34},
ChartLabels -> {"With screening", "No screening"} ,
ChartElements -> {womfig, {1, 1}}, BarOrigin -> Left,
PlotLabel -> Style["Lifetime cervical cancer deaths
per 1000 women", FontSize -> 18], PlotRange -> Full,
ImageSize -> Large, BarSpacing -> 0]
This is a good start, producing this figure, but with a lot of wasted space:
I have been less successful in trying to eradicate the dead space unfortunately; when I try to truncate to just the bars of interest, it creates a unwanted space between the bars.
For example, if I add PlotRange -> {{-1.5, 8.5}, {0.5, 2}}, it makes things a lot worse. I imagine this has to do with rescaling of the chart elements when you adjust the plot region: but is there an easy way to produce something like the below?
I ask because eventually this will need to take varying values, so manual tweaking is a nuisance...
AxesOrigin -> {2, 0}, PlotRange -> {Automatic, {0, 2.5}}
seems to solve both your problem and the problem @OkkesDulgerci mentioned.PlotLabel
could be better positioned by wrapping the plot in aLabeled
function. Tested in Mathematica 12.3 $\endgroup$