8000 Dotted grid lines in v2.0.0b1 · Issue #6515 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content
Dotted grid lines in v2.0.0b1 #6515
Closed
Closed
@rayosborn

Description

@rayosborn

After installing v2.0.0b1 into my conda installation (Mac OS X 10.11.5, Python 2.7.11, Anaconda 2.3.0), I noticed a subtle problem with dotted lines in grids. I used the following code to generate the two attached images in v1.5.1 and v2.0.0b1, respectively:

import numpy as np
import matplotlib.pyplot as plt

x = np.array([1, 1, 1, 2, 2, 2, 3, 3, 3])
y = np.array([1, 2, 3, 1, 2, 3, 1, 2, 3])
a = np.array([1, 2, 3, 4, 5, 6, 7, 8, 9])
grid = a.reshape(3, 3)

plt.imshow(grid, extent=(x.min(), x.max(), y.min(), y.max()),interpolation='bicubic')
plt.grid(linestyle='dotted')
plt.show()

If you blow up the new image, alternate dots are linked by a faint gray line, whereas the old dots are clearly separated. Overlaid on some plots, this can make the gridlines look more like dashed lines.
old-matplotlib-grid
new-matplotlib-grid

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0