PairedBarChart: Remove space at bottom and add tick axes

1.I have a PairedBarChart with many bars like this

   size = 50;
PairedBarChart[RandomReal[1, size], RandomReal[1, size],
AspectRatio -> 1]


I changed the AspectRatio (e.g. 3 in this case but could be higher)

size = 50;
PairedBarChart[RandomReal[1, size], RandomReal[1, size],
AspectRatio -> 3]


Now there is a space at the bottom between the axis and the last bar which gets larger the higher the Aspect Ratio.

How can I remove that space at the bottom or make it a specific length respectively?

2.I want to add another axis on the top of the Chart with ticks of my choice, i.e. not from 0 to 1 but another scale e.g. 0 to 100. Is it possible to do so?

• Your first question can be solved with the following: PairedBarChart[RandomReal[1, size], RandomReal[1, size], PlotRange -> {Automatic, {0, size}}, ImagePadding -> {{0, 0}, {20, 0}}]. To see that ImagePadding is necessary, try it without it. – JimB Apr 4 '17 at 14:25

Here is code that answers both of the questions:

size = 50;
PairedBarChart[RandomReal[1, size], RandomReal[1, size],
AspectRatio -> 2, AxesOrigin -> {0, 1}, Frame -> True,
FrameTicks -> {{None,
None}, {{#, 100 #} & /@ Range[0, 1, 0.25], {#, 100 #} & /@
Range[0, 1, 0.25]}}]


Answering a comment by @user6014 :

I took his post to mean he wanted the original ticks on the bottom, but an alternative one on top. Yours merely replaces both the top and the bottom. Is what I interpreted possible, i.e. 2 different ticks sets? (perhaps I misinterpreted the poster, though...)

size = 50;
PairedBarChart[RandomReal[1, size], RandomReal[1, size],
AspectRatio -> 2, AxesOrigin -> {0, 1}, Frame -> True,
FrameTicks -> {{None,
None}, {Range[0, 1, 0.25], {#, 100 #} & /@ Range[0, 1, 0.25]}}]


• I took his post to mean he wanted the original ticks on the bottom, but an alternative one on top. Yours merely replaces both the top and the bottom. Is what I interpreted possible, i.e. 2 different ticks sets? (perhaps I misinterpreted the poster, though...) – user6014 Apr 4 '17 at 14:30
• @user6014 I think you are probably right, and that is easily done with the option value of FrameTicks. I updated my answer. – Anton Antonov Apr 4 '17 at 14:31
• @AntonAntonov: Thanks very much! I wanted to display two different ticks which you already answered as well, great :) – holistic Apr 4 '17 at 16:19