-
-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Closed
Milestone
Description
Expected behavior: plt.rc('xtick', top=False) should prevent any ticks from displaying at the top edge of the axes.
What happens instead: minor ticks are visible at the top edge.
import numpy as np
import matplotlib.pyplot as plt
# set up plot style
plt.rc('xtick.minor', size=15) # minor ticks extra long so they're obvious
plt.rc('xtick', top=False) # should be no ticks at top (major or minor)
# plot data
data = np.random.rand(100).reshape(10, 10)
fig, ax = plt.subplots(1, 1)
ax.imshow(data)
# customize tick locations
ax.set_xticks(np.arange(10)[1::2], minor=False) # this respects top=False
ax.set_xticks(np.arange(10)[::2], minor=True) # this does notmatplotlib version: 1.5.1+1643.g0423430 compiled from source on Linux (Xubuntu 14.04 64-bit)
Reactions are currently unavailable
