Skip to content

extra minor-ticks on the colorbar when used with the extend option #11510

Closed
@pharshalp

Description

@pharshalp

Bug report

Bug summary
extra minor-ticks show up on the colorbar when it is extended (at either or both ends).

Code for reproduction

import matplotlib.pyplot as plt
import numpy as np

# Making yticks longer in length to highlight the issue
plt.rcParams['ytick.major.size'] = 10
plt.rcParams['ytick.minor.size'] = 4


np.random.seed(seed=12345)
x = np.random.randn(20, 20)
fig, ax = plt.subplots()
im = ax.pcolormesh(x)

cbar = fig.colorbar(im, extend='both')
cbar.ax.minorticks_on()
plt.show()

Actual outcome
figure_1

Matplotlib version

  • Operating system: MacOSX
  • Matplotlib version: 2.2.2
  • Matplotlib backend (print(matplotlib.get_backend())): MacOSX
  • Python version: Python 3.6.5

Installed via anaconda (default channel)

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions