how can I change the colorbar borders so that they are white and not black (externals border and between each segment)?
For example:
x=randint(100, size=(10,10))
cs=contourf(x)
cb=colorbar(cs)
give
but I want :
Thanks
edit: Notice the comments below for MPL 1.3 and later.
Add:
cb=colorbar(cs, drawedges=True)
cb.outline.set_color('white')
cb.outline.set_linewidth(2)
cb.dividers.set_color('white')
cb.dividers.set_linewidth(2)
As PiQuer mentioned:
cb.outline.set_edgecolor('white')
works nowadays
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With