Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
Open
Milestone
Description
The following script show a mis-alignment between grid lines and image patterns while they should be aligned:
importnumpyasnpimportmatplotlibmatplotlib.use('Agg')importmatplotlib.pyplotaspltn=16fig=plt.figure(figsize=(6,6))Z=np.zeros((n,n))Z[::2,::2]=Z[1::2,1::2]=1plt.imshow(Z,interpolation='none',cmap=plt.cm.gray,extent=[0,n,0,n],alpha=0.25)plt.xticks(np.arange(0,n), []),plt.yticks(np.arange(0,n), [])plt.grid(ls='solid')delta=0.01plt.xlim(1-delta,1+delta),plt.ylim(1-delta,1+delta)plt.savefig('pylab-grid.png')plt.savefig('pylab-grid.pdf')