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

[ENH]: Removecanvas.draw fromwidgets.Cursor.onmove #26901

Open
@komoto48g

Description

@komoto48g

Problem

A busy icon appears every time the mouse goes off the axes and the cursor is cleared.
For image files ~100MB, the busy icon lasts 1-2 seconds each time.

Sample code:

frommatplotlib.widgetsimportCursorfrommatplotlibimportpyplotaspltfrommatplotlibimportcmfromPILimportImagefig,ax=plt.subplots()img=Image.open(r"Path to large image file ~100MB")ax.imshow(img,cmap=cm.gray)cursor=Cursor(ax,useblit=True,color='red',linewidth=1)plt.show()

Proposed solution

I think the behavior of not clearing the cursor when the mouse goes off the axes is acceptable.
It is also consistent with the behavior of the similar classMultiCursor which doesn't callcanvas.draw.

If accepted, the following lines can be removed andneedclear will also be removed:

ifself.needclear:
self.canvas.draw()
self.needclear=False

Metadata

Metadata

Assignees

No one assigned

    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