Skip to content

marker edges overlap with marker #13360

Closed
@krrk

Description

@krrk

Bug report

Bug summary

Marker edge overlaps with marker and the edge appears to be double the width specified. This becomes obvious when you use alpha transparency and a very larger point marker with a large edge width or in the case where I noticed it a small figure (about 2 inches wide) with the default rcParams.

Code for reproduction

Case 1: very large point with a large edge width

plt.figure()
plt.plot(1, '.', ms=200, mew=50, alpha=0.5)

Case 2: very small figure with default rcParams: markersize = 8, markeredgewidth=1.0

plt.figure(figsize=(1,1), dpi=600)
plt.plot(1, '.', alpha=0.5)

Actual outcome
In this figure I have markersize=200 and markeredgewith=50. There is an ugly ring and it looks as if the marker edges are two times wider (100 instead of 50) than I asked.
figure_1
Now in this figure I have markersize=200 and markeredgewidth=99. There is a single pixel in the center that is faded blue thus the markeredges are definitely twice what I asked for. If I set the markeredgewith to 100 I get a solid core.
figure_2

Expected outcome
I would expect that the marker edge would line up perfectly with the marker core. In this plot I set markersize to 300 (200 plus 2*50 edges) to get the same size as the original without the ugly ring.
figure_3

Matplotlib version

  • Operating system: macOS 10.13
  • Matplotlib version: 3.0.2
  • Matplotlib backend: both with Qt and PGF backends
  • Python version: 3.7.2
  • matplotlib installed via pip

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions