DOC: Start to document interactive figures#4779
Conversation
|
Btw I think issue #4732 should be addressed first. |
|
@mdehoon Have you had a chance to look at the updated text? |
doc/users/interactive_guide.rst
Outdated
There was a problem hiding this comment.
Maybe add the reference: "For further details see: http://www.amazon.com/Interactive-Applications-using-Matplotlib-Benjamin/dp/1783988843?"
doc/users/interactive_guide.rst
Outdated
|
I'm not going to let this hold up 1.5.0 -- as it's doc only, it's low cost to just put it in 1.5.1. |
|
I don't think this is required to be on 2.0. |
fde979f to
61a194b
Compare
|
@QuLogic I think I got all of your comments |
|
In principle this is good to go, but I am not a great writer... |
Co-authored-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
Co-authored-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
| :template: autosummary.rst | ||
| :nosignatures: | ||
|
|
||
| pyplot.show |
There was a problem hiding this comment.
Was there a reason for having these two separately from the above?
There was a problem hiding this comment.
I was trying to group ion, ioff, isinteractive as a "family" that queries and modifies the state of interactive mode and these two as a "family" that may run the GUI event loop. I'm not sure if it works as well in practice as it does in my head.
There was a problem hiding this comment.
It's a logical distinction; is it worth preceding each group with a concise statement of what makes it a family?
Co-authored-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
QuLogic
left a comment
There was a problem hiding this comment.
I suppose we can leave this till Monday or whenever we tag 3.3 rc.
Co-authored-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
efiring
left a comment
There was a problem hiding this comment.
Partial review so far--I haven't looked beyond interactive.rst. Thank you for moving this forward. It doesn't have to be perfect to be merged; it's a big step in the right direction.
| :template: autosummary.rst | ||
| :nosignatures: | ||
|
|
||
| pyplot.show |
There was a problem hiding this comment.
It's a logical distinction; is it worth preceding each group with a concise statement of what makes it a family?
| If you are in non-interactive mode (or created figures while in | ||
| non-interactive mode) you may need to explicitly call `.pyplot.show` | ||
| to bring the windows onto your screen. If you only want to run the | ||
| GUI event loop for a fixed amount of time you can use `.pyplot.pause`. |
There was a problem hiding this comment.
-> "GUI event loop and block for a fixed amount of time..." In the typical (I suspect) use case, the key desired behavior is the blocking, not the interactivity via the GUI event loop.
doc/users/interactive.rst
Outdated
| integrated with your command prompt. If you have the GUI event loop | ||
| integrated with your prompt, then shown figures will be "live" while | ||
| the prompt is waiting for input, if it is not integrated then your | ||
| figures will only be "live" when the GUI event loop is running (via |
There was a problem hiding this comment.
This is confusing to me. Where does "interactive mode" fit into this second part of the paragraph? Maybe the missing point is that in "interactive mode" but without ipython magic, when working at the command line, the figure will be updated on the screen with each command, but it will not respond to mouse actions or keystrokes; for that, one needs the magic.
There was a problem hiding this comment.
At least PyQt and tkinter have ship with hooks that integrate with the readline implementation of the "plain" Python prompt. The IPython magic is the easiest way but not the only way.
| Close Figure :rc:`keymap.quit` | ||
| Constrain pan/zoom to x axis hold **x** when panning/zooming with mouse | ||
| Constrain pan/zoom to y axis hold **y** when panning/zooming with mouse | ||
| Preserve aspect ratio hold **CONTROL** when panning/zooming with mouse |
There was a problem hiding this comment.
This is needed only for zooming, I think; panning never changes the aspect ratio.
There was a problem hiding this comment.
right-click pan will change the view limits and respect this.
There was a problem hiding this comment.
I've never heard of right-click pan before, as far as I know. Maybe I've never stumbled over it because I use the Mac trackpad rather than a mouse.
There was a problem hiding this comment.
right-click zoom zooms out (by putting the current view limits to be where the box you drew was)
Co-authored-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
|
I don't know if it's old, or too large, or what, but I had to try 3 times to merge that... |
In bb8058a via matplotlib#4779 I accidentally deleted the (illustrated) section on what the buttons on the default toolbar do. I suspect that this was a bad rebase as I do not think I would have intentionally deleted this content. This commit: - restores the content as-was: git checkout b49973a doc/users/navigation_toolbar.rst - fixes the paths to images (the files have moved around) - copy the navigation content into interactive.rst and re-remove navigation_toolbar.rst Partially addresses matplotlib#25266.
In bb8058a via matplotlib#4779 I accidentally deleted the (illustrated) section on what the buttons on the default toolbar do. I suspect that this was a bad rebase as I do not think I would have intentionally deleted this content. This commit: - restores the content as-was: git checkout b49973a doc/users/navigation_toolbar.rst - fixes the paths to images (the files have moved around) - copy the navigation content into interactive.rst and re-remove navigation_toolbar.rst Partially addresses matplotlib#25266.
This is still a work in progress (as there are still empty sections)
@mdehoon @WeatherGod Thoughts?