-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Closed
Labels
Description
Hello! I've updated matplotlib
to the latest version (3.1.1) and got an issue: imshow draws half of the first and last lines when I use set_yticks
.
Example:
import numpy as np
from matplotlib import pyplot as plt
oneDim = np.array([0.5,1,2.5,3.7])
twoDim = np.random.rand(8,4)
plt.figure(figsize=(twoDim.shape[1]/2,twoDim.shape[0]/2))
ax = plt.gca()
ax.imshow(twoDim, cmap='Purples', interpolation='nearest', aspect='auto')
ax.set_xticks(np.arange(0,twoDim.shape[1],1))
ax.set_yticks(np.arange(0,twoDim.shape[0],1))
ax.set_yticklabels(np.arange(0,twoDim.shape[0],1))
ax.grid()
How I can back to full square in line instead of the half?