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

Drawing the canvas does not populate ticklabels on MacOSX backend #19268

Closed
Milestone
@mwaskom

Description

@mwaskom

Bug report

Bug summary

This is basically the same issue as#6103, but I have found that the "correct" approach selectively fails on the macosx backend. I decided to open a separate issue because there's a lot going on in the original thread.

(BTW I do support the suggestion in the original thread thatget_{x/y}ticklabels should implicitly draw so that it always returns a sensible result).

Code for reproduction

importmatplotlib.pyplotaspltax=plt.figure().subplots()ax.plot(["a","b","c"], [1,2,3])ax.figure.canvas.draw()print(ax.get_xticklabels())

Actual outcome

Using the MacOSX backend:

[Text(0, 0, ''), Text(0, 0, ''), Text(0, 0, '')]

Expected outcome

Using an agg-based backend:

[Text(0, 0, 'a'), Text(1, 0, 'b'), Text(2, 0, 'c')]

Matplotlib version

  • Operating system:
  • Matplotlib version: (import matplotlib; print(matplotlib.__version__)) 3.3.3
  • Matplotlib backend (print(matplotlib.get_backend())): macosx
  • Python version: 3.8
  • Jupyter version (if applicable): n/a
  • Other libraries: n/a

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp