I've been seeing weird behaviour with using a colorbar() and adjusting
the plot extents, either interactively in the GUI or through
figure.subplots_adjust. If I adjust the axes after drawing the
colorbar, it is placed incorrectly. This seems to happen independently
of the backends that I have and even continues through to the written
file with figure.save_fig. I'm using matplotlib.__version__ = 1.1.0,
with a git checkout that I recently updated.
I have included a short test .py that shows the problem, and two
images that it produces:
- Adjusting after drawing the plot: http://ndevenish.com/images/post_adjust.png
- Adjusting before drawing the plot: http://ndevenish.com/images/pre_adjust.png
Is there a way I can avoid or correct this behaviour? It certainly
seems erroneous that using the figure GUI to adjust plot bounds
doesn't work, and is an especially nice way of tweaking for final
plots.
Thanks,
Nick
(apologies if this comes through twice, gmail was acting up)
example.py (703 Bytes)