Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork8.1k
Closed
Labels
Milestone
Description
Bug report
I'm usingimshow, and between 3.1.0 and 3.1.1 the behavior of the extents of the plot has changed when usingAxes.set_yticks. In 3.1.0, and in 3.1.1 when not callingset_yticks, the plot includes the outer 0.5 bin in the top and bottom rows. This is the desired behavior. But in 3.1.1 when usingset_yticks, the outer 0.5 bin in the top and bottom rows is not included in the plot.
Code for reproduction
importmatplotlibimportmatplotlib.pyplotaspltxy= [[1,3], [2,4]]fig,ax=matplotlib.pyplot.subplots(1)ax.imshow(xy)ax.set_xticks([0,1])ax.set_xticklabels(["0","1"])ax.set_yticks([0,1])ax.set_yticklabels(["0","1"])fig.savefig(f"matplotlib-v{matplotlib.__version__}.png")
The behavior changes in 3.1.1 ifax.set_yticks([0, 1]) is commented out.
Behavior in 3.1.1 withset_yticks
Matplotlib version
- Operating system: Mac OS 10.14.5
- Matplotlib version: 3.1.1
- Matplotlib backend: agg
- Python version: 3.7.3
- Jupyter version (if applicable): N/A
- Other libraries: Fresh conda install of just matplotlib, using conda-forge
