colorbar
2019-01-02 本文已影响8人
榴莲气象
Set Matplotlib colorbar size to match graph
![](https://img.haomeiwen.com/i635081/ef7db549e7de9b10.png)
Rotation of colorbar tick labels in matplotlib
cbar.ax.set_xticklabels(clevs1[::1],rotation=90)
![](https://img.haomeiwen.com/i635081/cb4ac247e107cc43.png)
https://matplotlib.org/examples/pylab_examples/contourf_demo.html
![](https://img.haomeiwen.com/i635081/c9b28379c08dfbfb.png)
extendrect bool
If False the minimum and maximum colorbar extensions
will be triangular (the default). If True the
extensions will be rectangular.
cb = plt.colorbar(t_contour, extendfrac=1/3, extendrect=True,shrink=0.5,pad=0.1)
![](https://img.haomeiwen.com/i635081/7a4eb9353f2d7e7f.png)