Merge 1717777e8b218fc83ac72f67e2654c5a7b778f22 into 073724a84c47cf4de5b2c0fe755389c8df66eec8
This commit is contained in:
commit
c6705eeee9
@ -1000,7 +1000,14 @@ function _before_layout_calcs(plt::Plot{PyPlotBackend})
|
|||||||
# create and store the colorbar object (handle) and the axis that it is drawn on.
|
# create and store the colorbar object (handle) and the axis that it is drawn on.
|
||||||
# note: the colorbar axis is positioned independently from the subplot axis
|
# note: the colorbar axis is positioned independently from the subplot axis
|
||||||
fig = plt.o
|
fig = plt.o
|
||||||
cbax = fig[:add_axes]([0.8,0.1,0.03,0.8], label = string(gensym()))
|
|
||||||
|
if haskey(fig, :cbar_ax)
|
||||||
|
cbax = fig[:cbar_ax]
|
||||||
|
cbar[:clear]()
|
||||||
|
else
|
||||||
|
cbax = fig[:add_axes]([0.8,0.1,0.03,0.8], label = string(gensym()))
|
||||||
|
end
|
||||||
|
|
||||||
cb = fig[:colorbar](handle; cax = cbax, kw...)
|
cb = fig[:colorbar](handle; cax = cbax, kw...)
|
||||||
cb[:set_label](sp[:colorbar_title])
|
cb[:set_label](sp[:colorbar_title])
|
||||||
sp.attr[:cbar_handle] = cb
|
sp.attr[:cbar_handle] = cb
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user