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

get_tightbbox doesn't account for markeredgewidth #16606

Labels
keepItems to be ignored by the “Stale” Github Action
@brunobeltran

Description

@brunobeltran

Simple to solve problem, making issue just to refer to it in the PR.

Bug report

For lines,Axes.get_tightbbox relies onLine2D.get_window_extent, which computes extra padding due to markers as

ms= (self._markersize/72.0*self.figure.dpi)*0.5

but this can cut off half of the marker edge.

This phenomena which is only visible if you have a line that extends outside of a plot, and hasmarkeredgewidth > 1. For simple markers, (like 'S', 'O'), the code should instead read

extra_pts=self._markersize+self._markeredgewidthms= (extra_pts/72.0*self.figure.dpi)*0.5

I'll edit this shortly to include code that reproduces the bug, after I document for all the common markers what the expected behavior should be.

Matplotlib version

  • Operating system: Linux
  • Matplotlib version: 3.2.0rc2.post1594.dev0+gead45c7e6
  • Matplotlib backend: module://ipykernel.pylab.backend_inline`
  • Python version: 3.7.3
    MPL installed from Github, Python is miniconda.

Metadata

Metadata

Assignees

No one assigned

    Labels

    keepItems to be ignored 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