From 5b3c41bd774f96b6e19aedad119c53df2d77cfb4 Mon Sep 17 00:00:00 2001 From: AnkurD Date: Tue, 26 Sep 2017 17:22:17 +0900 Subject: [PATCH] Colorbar takes font style from Y Axis --- src/backends/pyplot.jl | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/backends/pyplot.jl b/src/backends/pyplot.jl index ff2853f2..f5ffbc07 100644 --- a/src/backends/pyplot.jl +++ b/src/backends/pyplot.jl @@ -999,13 +999,13 @@ function _before_layout_calcs(plt::Plot{PyPlotBackend}) # 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 fig = plt.o - cbax = fig[:add_axes]([0.8,0.1,0.03,0.8], label = string(gensym())) - cb = fig[:colorbar](handle; cax = cbax, kw...) - cb[:set_label](sp[:colorbar_title],size=py_dpi_scale(plt, sp[:yaxis][:guidefont].pointsize),family=sp[:yaxis][:guidefont].family) - for lab in cb[:ax][:yaxis][:get_ticklabels]() - lab[:set_fontsize](py_dpi_scale(plt, sp[:yaxis][:tickfont].pointsize)) - lab[:set_family](sp[:yaxis][:tickfont].family) - end + cbax = fig[:add_axes]([0.8,0.1,0.03,0.8], label = string(gensym())) + cb = fig[:colorbar](handle; cax = cbax, kw...) + cb[:set_label](sp[:colorbar_title],size=py_dpi_scale(plt, sp[:yaxis][:guidefont].pointsize),family=sp[:yaxis][:guidefont].family) + for lab in cb[:ax][:yaxis][:get_ticklabels]() + lab[:set_fontsize](py_dpi_scale(plt, sp[:yaxis][:tickfont].pointsize)) + lab[:set_family](sp[:yaxis][:tickfont].family) + end sp.attr[:cbar_handle] = cb sp.attr[:cbar_ax] = cbax end