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

Minor fixes to event handling docs.#10656

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
timhoffm merged 1 commit intomatplotlib:masterfromanntzer:eventhandlingdoc
Mar 3, 2018
Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletionsdoc/users/event_handling.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -4,7 +4,7 @@
Event handling and picking
**************************

matplotlib works with a number of user interface toolkits (wxpython,
Matplotlib works with a number of user interface toolkits (wxpython,
tkinter, qt4, gtk, and macosx) and in order to support features like
interactive panning and zooming of figures, it is helpful to the
developers to have an API for interacting with the figure via key
Expand DownExpand Up@@ -47,14 +47,16 @@ disconnect the callback, just call::
fig.canvas.mpl_disconnect(cid)

.. note::
The canvas retains only weak references to the callbacks. Therefore
if a callback is a method of a class instance, you need to retain
a reference to that instance. Otherwise the instance will be
garbage-collected and the callback will vanish.
The canvas retains only weak references to instance methods used as
callbacks. Therefore, you need to retain a reference to instances owning
such methods. Otherwise the instance will be garbage-collected and the
callback will vanish.

This does not affect free functions used as callbacks.


Here are the events that you can connect to, the class instances that
are sent back to you when the event occurs, and the event descriptions
are sent back to you when the event occurs, and the event descriptions:


======================= =============================================================================================
Expand Down
17 changes: 8 additions & 9 deletionsexamples/event_handling/README.txt
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
.. _event_handling_examples:

EventHandling
Eventhandling
==============

Matplotlib supports event handling with a GUI neutral event model, so
you can connect to Matplotlib events without knowledge of what user
interface Matplotlib will ultimately be plugged in to. This has two
advantages: the code you write will be more portable, and Matplotlib
events are aware of things like data coordinate space and which axes
the event occurs in so you don't have to mess with low level
transformation details to go from canvas space to data space. Object
picking examples are also included.
Matplotlib supports :doc:`event handling</users/event_handling>` with a GUI
neutral event model, so you can connect to Matplotlib events without knowledge
of what user interface Matplotlib will ultimately be plugged in to. This has
two advantages: the code you write will be more portable, and Matplotlib events
are aware of things like data coordinate space and which axes the event occurs
in so you don't have to mess with low level transformation details to go from
canvas space to data space. Object picking examples are also included.

[8]ページ先頭

©2009-2025 Movatter.jp