When making an imshow plot using matplotlib in Python3, half of the upper and lower row is removed once I activate named yticks.
See the example below:
import numpy as np
import matplotlib
import matplotlib.pyplot as plt
dummy_data = np.random.rand(5,8)
ynames = ['one','two','three','four','five']
fig = plt.figure(2)
ax = plt.gca()
im = ax.imshow(dummy_data)
plt.grid(None)
fig = plt.figure(3)
ax = plt.gca()
im = ax.imshow(dummy_data)
ax.set_yticks(np.arange(len(ynames)))
ax.set_yticklabels(ynames)
plt.grid(None)
How do I get back these upper and lower half rows?