Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Error in Agg backend's PNG renderer whenmarkeredgewidth > markersize #16621

Closed as not planned
Labels
backend: aggstatus: closed as inactiveIssues closed by the "Stale" Github Action. Please comment on any you think should still be open.status: inactiveMarked by the “Stale” Github Action
@brunobeltran

Description

@brunobeltran

Bug report

Bug summary

Whenever the edge width of a marker is increased beyond the size of the marker, you would want the marker to

Code for reproduction

importmatplotlib.pyplotaspltforiinrange(0,150,20):fig,ax=plt.subplots()lines=ax.plot(0,0,marker='p',markersize=60,markeredgewidth=i,markeredgecolor='k',clip_on=False)plt.xlim([-0.04,0.04])plt.ylim([-0.04,0.04])plt.savefig(f'/home/bbeltr1/Downloads/test_{i}.png')fig._cachedRenderer

Actual outcome

While the outer extents of the pentagon's edge appear correct, you can see that the inner extents begin to recede away from the center as the edge width is set larger and larger, until eventually the original marker is fully visible again, along with some of the background.

Console output:
<matplotlib.backends.backend_agg.RendererAgg at 0x7f5277bf0e80>

Saved images:
test_0
test_20
test_40
test_60
test_80
test_100
test_120
test_140

Expected outcome

The expected outcome is a fully-shaded pentagon (due to the edge being huge). My PDF backend does this correctly, as seen below in a screenshot of whattest_140.pdf looks like if I save as'test_{i}.pdf' instead:

test_140 pdf

Matplotlib version

  • Operating system: Debian 9
  • Matplotlib version: 3.1.3
  • Matplotlib backend (print(matplotlib.get_backend())):module://ipykernel.pylab.backend_inline is what gets printed, and inline plots also show this error, but I can take Jupyter out of the loop by saving directly to file. Both cases are apparently usingRendererAgg to make the PNG, as seen above.
  • Python version: 3.7.3
  • Jupyter version (if applicable):
  • Other libraries:

Matplotlib was installed and updated via the default conda channel.

Metadata

Metadata

Assignees

No one assigned

    Labels

    backend: aggstatus: closed as inactiveIssues closed by the "Stale" Github Action. Please comment on any you think should still be open.status: inactiveMarked by the “Stale” Github Action

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp