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 Axes.redraw_in_frame in use of ExitStack: push() takes 2 positional arguments but 3 were given #18539

Closed
Milestone
@radarsat1

Description

@radarsat1

Bug report

Code that was working in 3.2.1 usesredraw_in_frame, now broken in 3.3.0 and 3.3.2, even though this API has not changed.

Bug summary

Use ofAxes.redraw_in_frame leads to an error calling functionExitStack.push().

Code for reproduction

Can be reproduced by running this small program,

import matplotlib.pyplot as pltfig, ax = plt.subplots(1,1)ax.plot([1,2,3])fig.canvas.draw()ax.redraw_in_frame()

Actual outcome

results in,

$ python3 redraw_test.py Traceback (most recent call last):  File "redraw_test.py", line 7, in <module>    ax.redraw_in_frame()  File "/home/stephen.sinclair/.local/lib/python3.6/site-packages/matplotlib/axes/_base.py", line 2777, in redraw_in_frame    stack.push(artist.set_visible, artist.get_visible())TypeError: push() takes 2 positional arguments but 3 were given

Tested only in Python 3.6 and Python 3.7, but according to docs, the API for contextlib.ExitStack.push has not changed with Python 3.8, so error should be the same.

Expected outcome

Functionredraw_in_frame gives no error.

Matplotlib version

Code worked with matplotlib 3.2.1, but broken in 3.3.2.

  • Operating system: Ubuntu 18.04
  • Matplotlib version: 3.3.2
  • Matplotlib backend: TkAgg, Agg.
  • Python version: 3.6, 3.7.
  • Jupyter version (if applicable): n/a
  • Other libraries: n/a

Installed via pip3.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp