From 2d576a6597c9a30f890a6f2a619ab02a8b342ebd Mon Sep 17 00:00:00 2001 From: Zhanibek Date: Thu, 21 May 2020 18:14:12 +0900 Subject: [PATCH] pyplot colorbar fixes --- src/backends/pyplot.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/backends/pyplot.jl b/src/backends/pyplot.jl index 1af9558a..df1e7127 100644 --- a/src/backends/pyplot.jl +++ b/src/backends/pyplot.jl @@ -1007,9 +1007,9 @@ function _before_layout_calcs(plt::Plot{PyPlotBackend}) # note: the colorbar axis is positioned independently from the subplot axis fig = plt.o - # There is no point specifying colorbar size, hence rand(4) as it will get + # There is no point in specifying colorbar size, hence zeros(4). It will get # updated at function _update_plot_object(plt::Plot{PyPlotBackend}) - cbax = fig."add_axes"(rand(4), label = string(gensym())) + cbax = fig."add_axes"(zeros(4), label = string(gensym())) cb = fig."colorbar"(handle; cax = cbax, kw...) cb."set_label"(sp[:colorbar_title],size=py_thickness_scale(plt, sp[:yaxis][:guidefontsize]),family=sp[:yaxis][:guidefontfamily], color = py_color(sp[:yaxis][:guidefontcolor]))