I am trying to put together a BarChart and a BoxWhiskerPlot in this form:
Show[BarChart[timesDifference[[2]],
ChartLabels -> Placed[timesDifference[[1]], Axis],
ChartStyle -> "Pastel", Frame -> True,
FrameLabel -> {"days", "Number of Individuals"}, PlotLabel -> name,
PlotRange -> All],
BoxWhiskerChart[(posList2 - posList1), "Mean", BarOrigin -> Left,
ChartStyle -> {{Gray}, {Opacity[0.6]}}, Frame -> True,
PlotRange -> {{0, 41}, All}]]
However I got two problems: 1. The graphs are out of phase. I mean, the max and min values of the BoxWhiskerPlot do not overlap those values in the BarChart. How can I make a good overlap? 2. In some graphs the BoxWhiskerPlot is so tiny or just in the edge of the x axes and it is difficult to see it. How can I put it in the center of the final graph? (this plot show how it looks-The grey line over the x axes-)
This is a part of the date for this plot. However, the position of the BoxWhiskerPlot change with the number of date. So, the position of the BoxWhiskerPlot becomes more to the bottom as long as I increased the date amount.
posList1 = {1, 7, 3, 9, 11, 9, 5, 9, 10, 9, 9, 9, 9, 10, 12, 11, 2,
10, 12, 12, 13, 12, 11, 15, 13, 13, 13, 14, 15, 13, 15, 14, 14, 15,
15, 16, 10, 16, 13, 12, 13, 15, 9, 10, 15, 11, 14, 12, 15, 15, 8,
16, 12, 16, 16, 15, 13, 15, 17, 18, 18, 14, 13, 15, 17, 18, 17, 17,
17, 14, 14, 16, 14, 17, 15, 16, 17, 17, 15, 13, 16, 14, 14, 17,
18, 16, 13, 14, 13, 19, 18, 18, 16, 16, 15, 14, 12, 14, 18, 12};
posList2 = {9, 12, 12, 14, 14, 14, 14, 14, 14, 15, 15, 15, 15, 16, 16,
16, 17, 17, 17, 17, 17, 17, 17, 17, 16, 17, 15, 18, 16, 18, 18,
18, 17, 17, 17, 17, 17, 18, 17, 17, 17, 18, 18, 18, 18, 18, 18, 18,
18, 18, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 20, 20, 20,
20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
20, 20, 18, 20, 20, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
21, 22, 22};
timesDifference = Tally[(posList2 - posList1) // Sort] // Transpose;