how to draw a colorbar with a white boundary

43 Views Asked by At

usually, when uses fig.colorbar(),it output like thisenter image description here

but when I need to draw a colorbar inside a figure, I want a colorbar with a white boundary.

how can I do that? I cant find any example like this.enter image description here

thanks for any help

==========solution=============

cb.ax.spines[:].set_color('white') #makes the boundary white
cb.ax.tick_params(direction='out', colors='white') #makes ticks and labels white
0

There are 0 best solutions below