Reducing the distance between two boxplots
You can either change the aspect ratio of plot or use the widths
kwarg (doc) as such:
ax.boxplot([values_cg, values_eg], widths=1)
to make the boxes wider.
Try changing the aspect ratio using
ax.set_aspect(1.5) # or some other float
The larger then number, the narrower (and taller) the plot should be:
a circle will be stretched such that the height is
num
times the width.aspect=1
is the same asaspect=’equal’
.
http://matplotlib.org/api/axes_api.html#matplotlib.axes.Axes.set_aspect