Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
Closed
Labels
Milestone
Description
Bug report
Bug summary
Images plotted by plt.imshow are always clipped, reglardless of the clip_on argument.
Code for reproduction
importnumpyasnpimportmatplotlib.pyplotaspltfrommatplotlib.cbookimportget_sample_datafig=plt.figure(figsize=(10,5))ax=plt.subplot(111)plt.subplots_adjust(left=0.25,bottom=0.1,right=0.75,top=0.9,wspace=0,hspace=0)# plot a line. When clip_on is set to False, the line is extended beyond the axesax.plot(np.linspace(0,2),np.sin(np.linspace(0,2)),clip_on=False)plt.xlim([0,1])plt.ylim([0,1])# plot a bitmap. Although clip_on is set to False, it is clipped by the axeslogo=plt.imread(get_sample_data("logo2.png",asfileobj=False))left,right,bottom,top=0.25,0.25+1.12,0.25,0.25+0.24ax.imshow(X=logo,extent=(left,right,bottom,top),clip_on=False)
Actual outcome
Expected outcome
The matplotlib logo shouldn't be clipped by the axes, since clip_on was set to False.
Matplotlib version
- Operating system: Ubuntu 18.04
- Matplotlib version: : 3.1.1 (pip installation)
- Matplotlib backend: Qt5Agg
- Python version: 3.6