Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
Backend refactor#8777
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
Closed
Uh oh!
There was an error while loading.Please reload this page.
Closed
Backend refactor#8777
Changes fromall commits
Commits
Show all changes
58 commits Select commitHold shift + click to select a range
9813e43
Refactor pass 1. Refactoring Gcf out of specific backend (backend_gt…
OceanWolf91cbffc
Refactor Pass 2. Refactored Gcf out of all backend code.
OceanWolfaa3ff59
Quick fix to figure for safe unpickling.
OceanWolff046e01
GTK3Agg
OceanWolf39ff708
Refactored making `FigureManager` a *figure* manager, plus added miss…
OceanWolf45c5fc2
keyword
OceanWolfebf0c57
Make add_element more general, and make sure the code complies with it.
OceanWolf9d25441
Better destroy order.
OceanWolf6ae52f2
GTK simplifications
OceanWolf1a47d3b
Added doc and cleaned backend_managers, don't want our new file dirty.
OceanWolfbc17372
Improve layout!
OceanWolf3fb46f2
Move knowledge of the backend to the manager.
OceanWolf2758f3f
Incorporate MEP22 into MEP27
OceanWolff354d3c
Improved new toolbar and updated tool_manager example accoridingly.
OceanWolf51c0598
fullscreen
OceanWolf6b35d85
MEP update
OceanWolf724b622
Finish MEP22 conversion
OceanWolf0b42bbe
rename window method
OceanWolfef65740
Add backend anme to widgets
OceanWolffb5202a
Handle FigureManager destroy internaly without pyplot.
OceanWolf26ce3e6
Make functionality more consistant for embedded applications
OceanWolf1cfebc4
Backend getter method for FigureManager
OceanWolfbc32fb1
Improve example after new method
OceanWolf81b9e69
Clean up the code a bit
OceanWolf85f0668
Remove old code from backend_managers
OceanWolf6535148
Cleanup
OceanWolf73e1122
Explicity get set manager as None if appropiate.
OceanWolf592c49b
figure attribute and canvas property
farizab5d7f57
Fix FigureCanvasBase
OceanWolfb842bdc
super
OceanWolf92de15e
figure setter
farizab619923
Improve MEP22 Tool Searching Structure
OceanWolfa07e482
adding example file
fariza2dd8895
super dooper
OceanWolfce9c8e7
Revert old example and fix new one.
OceanWolf5542c5a
Improve MEP22 tool-searching method.
OceanWolfa975717
MEP22 Save Figure Tool
OceanWolfecf1f23
pep8
OceanWolf4531085
Make ToolConfigureSubplots a generic tool
OceanWolf87fbd59
Improve flow handling and make it a lot more generic
OceanWolff7eb33d
Missing resize method
OceanWolf0a2aa5c
Convert to new structure for finding tools
OceanWolf777b162
doc
OceanWolf468bdd7
Add ExpandableBase
OceanWolf209af6b
Template Backend plus fix FigManager for non-GUI backends and add gen…
OceanWolf06686c7
rcParam and Travis
OceanWolf2d93df8
test always MEP27
OceanWolf6b15982
Fix FigureManager to allow pyplot to work for non GUI backends
OceanWolf61f61f6
Fix Gcf.show_all()
OceanWolf71f4813
doc
OceanWolfd3064b6
pep8
OceanWolf2ca898c
remove show_popup
OceanWolfa567af6
AttributeError
OceanWolf09fc887
Fixes for MEP27
OceanWolff60333d
STY: replace \ with () for line continuation
tacaswell072c47a
ENH: make MainLoopBase a context manager
tacaswell214b684
MNT: further simplify MainLoopBase
tacaswell35838c9
WIP:
tacaswellFile filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
6 changes: 5 additions & 1 deletion.travis.yml
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
1 change: 1 addition & 0 deletions.travis/toolmgr_matplotlibrc
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
toolbar : toolmanager |
35 changes: 18 additions & 17 deletionsdoc/devel/MEP/MEP27.rst
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
51 changes: 51 additions & 0 deletionsexamples/user_interfaces/gui_elements.py
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
'''This example demonstrates how to: | ||
* Create new toolbars | ||
* Create new windows | ||
Using `matplotlib.backend_managers.ToolManager`, | ||
`matplotlib.backend_bases.WindowBase` and | ||
`matplotlib.backend_bases.ToolContainerBase` | ||
''' | ||
from __future__ import print_function | ||
import matplotlib | ||
matplotlib.use('GTK3Cairo') | ||
matplotlib.rcParams['toolbar'] = 'toolmanager' | ||
import matplotlib.pyplot as plt | ||
fig = plt.figure() | ||
# Shortcuts to FigureManager and ToolManager | ||
manager = fig.canvas.manager | ||
tool_mgr = manager.toolmanager | ||
# Create a new toolbar | ||
topbar = manager.backend.Toolbar(tool_mgr) | ||
# Add it to the figure window, we can place it north, east, west and south | ||
manager.window.add_element(topbar, 'north') | ||
# Remove some tools from the main toolbar and add them to the | ||
# new sidebar | ||
for tool in ('home', 'back', 'forward'): | ||
manager.toolbar.remove_toolitem(tool) | ||
topbar.add_tool(tool, None) | ||
plt.plot([1, 2, 3]) | ||
# Add a new window | ||
win = manager.backend.Window('Extra tools') | ||
# create a sidebar for the new window | ||
sidebar = manager.backend.Toolbar(tool_mgr) | ||
# add the sidebar to the new window | ||
win.add_element(sidebar, 'west') | ||
# Add some tools to the new sidebar | ||
for tool in ('home', 'back', 'forward', 'zoom', 'pan'): | ||
sidebar.add_tool(tool, None) | ||
# show the new window | ||
win.show() | ||
plt.show() |
4 changes: 2 additions & 2 deletionsexamples/user_interfaces/toolmanager_sgskip.py
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
59 changes: 57 additions & 2 deletionslib/matplotlib/_pylab_helpers.py
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
Oops, something went wrong.
Uh oh!
There was an error while loading.Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.