pyensae icon indicating copy to clipboard operation
pyensae copied to clipboard

Misaligned cbar...

Open zwep opened this issue 3 years ago • 0 comments

Hi,

here is a short note/message... When using the Corrplot class and adding a colorbar, the ticks were a bit misaligned. I modified the plot function to return the cbar object and then re-define the ticks by so

scalarmap = cm.ScalarMappable(norm=mcolors.Normalize(*[-1, 1]), cmap='seismic_r') cb_obj.update_normal(scalarmap) cb_obj.set_ticks([-1, -0.5, 0, 0.5, 1]) cb_obj.ax.tick_params(size=0) This, somehow, did make a proper alignment of the ticks

zwep avatar Sep 23 '22 10:09 zwep