The markers are not hollow when I use ax.scatter() and set markers.MarkerStyle()'s fillstyle to 'none'. My usage is wrong? · Issue #17527 · matplotlib/matplotlib · GitHub
Skip to content

The markers are not hollow when I use ax.scatter() and set markers.MarkerStyle()'s fillstyle to 'none'. My usage is wrong? #17527

Description

@NoahFeng

I want to set markers hollow. So I make a costomed markers.MarkerStyle and set the paramter fillstyle='none'. But I don't get what I want.

Code for reproduction

from matplotlib import pyplot as plt
from matplotlib import markers
import numpy as np
xy = np.random.rand(10, 2)
fig, ax = plt.subplots()
style = markers.MarkerStyle(marker='o', fillstyle='none')
ax.scatter(xy[:, 0], xy[:, 1], marker=style)
plt.show()

Actual outcome

Snipaste_2020-05-28_18-17-01

Expected outcome
This is what I want.
Snipaste_2020-05-28_18-20-13

When I check out the source code about the matplotlib.markers.MarkerStyle, I find:
Snipaste_2020-05-28_18-27-40
It seems that it doesn't process fillstyle='none'.
I don't know why. Maybe my usage is wrong. Could anyone help me?

Matplotlib version

  • Operating system: Win10
  • Matplotlib version: 3.1.1
  • Python version: 3.6.6

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions