Merge pull request #794 from daschw/ds-pyplot-colorbar

Avoid PyPlot colorbar label cropping
This commit is contained in:
Daniel Schwabeneder 2017-05-04 16:17:17 +02:00 committed by GitHub
commit 1e6b442c6c

View File

@ -1102,7 +1102,7 @@ function _update_min_padding!(sp::Subplot{PyPlotBackend})
# optionally add the width of colorbar labels and colorbar to rightpad
if haskey(sp.attr, :cbar_ax)
bb = py_bbox(sp.attr[:cbar_handle][:ax][:get_yticklabels]())
sp.attr[:cbar_width] = _cbar_width + width(bb) + 1mm + (sp[:colorbar_title] == "" ? 0px : 30px)
sp.attr[:cbar_width] = _cbar_width + width(bb) + 2.3mm + (sp[:colorbar_title] == "" ? 0px : 30px)
rightpad = rightpad + sp.attr[:cbar_width]
end