FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

WIP: Oo interactive; enable interactive mode with Axes and Figure methods by efiring · Pull Request #4082 · matplotlib/matplotlib · GitHub

Repository navigation

WIP: Oo interactive; enable interactive mode with Axes and Figure methods - #4082

Closed
efiring wants to merge 4 commits into
matplotlib:masterfrom
efiring:oo-interactive
Closed

efiring wants to merge 4 commits into
matplotlib:masterfrom
efiring:oo-interactive

Conversation

efiring commented Feb 8, 2015

Copy link
Copy Markdown
Member

This is a sketch illustrating one method of allowing one to use the OO interface in interactive mode. It involves adding three methods to the Figure and Axes classes, and then using a decorator for any method in those classes that should have a draw_if_interactive behavior. Typically this would include all such methods that are wrapped in pyplot. In the initial version of this PR, this is illustrated with Figure.suptitle, Figure.text, Axes.plot, and Axes.errorbar. Print statements are presently left in to show how the system works; in particular, note that even though errorbar calls plot, the drawing operation is executed only once, so there is no significant loss of efficiency compared to the present pyplot function. A simple illustration in ipython is:

%matplotlib
import matplotlib.pyplot as plt
fig = plt.gcf()
fig.text(0.5, 0.5, 'testing')
ax = plt.gca()
ax.plot([1,2,3])
ax.errorbar([1,2.5, 3.5], [2, 3.5, 2], yerr=2)

efiring added this to the 1.5.0 milestone Feb 8, 2015

Copy link
Copy Markdown
Member

closing in favor of #4091

tacaswell closed this Mar 13, 2015
tacaswell reopened this Mar 13, 2015
tacaswell closed this Mar 15, 2015
efiring referenced this pull request Jun 8, 2015
With the repl callback the pyplot function do not need to
call `draw_if_interactive`.
efiring deleted the oo-interactive branch October 24, 2021 19:50
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL