I cannot get the colorbar on imshow graphs like this one to be the same height as the graph, short of using Photoshop after the fact. How do I get the heights to match?
Python – Set Matplotlib colorbar size to match graph
imagematplotlibpython
Related Topic
- Python – Convert bytes to a string
- Python – Plot logarithmic axes with matplotlib in python
- Python – Set Colorbar Range in matplotlib
- Python – Save plot to image file instead of displaying it using Matplotlib
- Python – Matplotlib different size subplots
- Python – How to set the figure title and axes labels font size in Matplotlib
- Python – How to have one colorbar for all subplots
- Changing image size in Markdown
Best Answer
This combination (and values near to these) seems to "magically" work for me to keep the colorbar scaled to the plot, no matter what size the display.
It also does not require sharing the axis which can get the plot out of square.