8000 minor ticks don't respect rcParam xtick.top / ytick.right · Issue #6408 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content
minor ticks don't respect rcParam xtick.top / ytick.right #6408
Closed
@drammock

Description

@drammock

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 not

mwe

matplotlib version: 1.5.1+1643.g0423430 compiled from source on Linux (Xubuntu 14.04 64-bit)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0