Merge pull request #3344 from daschw/py-wireframe

fix wireframe on pyplot
This commit is contained in:
Daniel Schwabeneder 2021-03-12 21:49:42 +01:00 committed by GitHub
commit 060162c356
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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