pyplot 3d color bar fixes
This commit is contained in:
parent
c7f390a2d5
commit
39f8547846
@ -1396,6 +1396,14 @@ function _update_plot_object(plt::Plot{PyPlotBackend})
|
|||||||
figw, figh = figw*px, figh*px
|
figw, figh = figw*px, figh*px
|
||||||
pcts = bbox_to_pcts(sp.plotarea, figw, figh)
|
pcts = bbox_to_pcts(sp.plotarea, figw, figh)
|
||||||
ax."set_position"(pcts)
|
ax."set_position"(pcts)
|
||||||
|
|
||||||
|
if haskey(sp.attr, :cbar_ax) && RecipesPipeline.is3d(sp) # 2D plots are completely handled by axis dividers
|
||||||
|
cbw = sp.attr[:cbar_width]
|
||||||
|
# this is the bounding box of just the colors of the colorbar (not labels)
|
||||||
|
cb_bbox = BoundingBox(right(sp.bbox)-cbw - 2mm, top(sp.bbox) + 2mm, _cbar_width-1mm, height(sp.bbox) - 4mm)
|
||||||
|
pcts = bbox_to_pcts(cb_bbox, figw, figh)
|
||||||
|
sp.attr[:cbar_ax]."set_position"(pcts)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
PyPlot.draw()
|
PyPlot.draw()
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user