MEP22: Navigation by events by fariza · Pull Request #3652 · matplotlib/matplotlib · GitHub
Skip to content

MEP22: Navigation by events#3652

Merged
WeatherGod merged 69 commits into
matplotlib:masterfrom
fariza:navigation-by-events
Apr 9, 2015
Merged

MEP22: Navigation by events#3652
WeatherGod merged 69 commits into
matplotlib:masterfrom
fariza:navigation-by-events

Conversation

@fariza

@fariza fariza commented Oct 16, 2014

Copy link
Copy Markdown
Member

This PR is the implementation of MEP22, https://github.com/matplotlib/matplotlib/wiki/Mep22#implementation

This it supersedes the #2759

Toolbar has been relegated as listener/emiter of events that get dispatched to the Tools by Navigation.

The toolbar is easily reconfigurable at running time. new tools can be created/added/removed without modificaion of the backend code.

Example
examples/user_interfaces/navigation.py

@tacaswell tacaswell modified the milestone: v1.5.x Oct 17, 2014
@WeatherGod

Copy link
Copy Markdown
Member

@tacaswell tacaswell modified the milestones: v1.5.x, unassigned Oct 18, 2014
@fariza fariza force-pushed the navigation-by-events branch from a33df0e to c09f561 Compare October 20, 2014 19:22
@fariza

fariza commented Oct 20, 2014

Copy link
Copy Markdown
Member Author

@tacaswell @WeatherGod @OceanWolf
After long traffic thinking time, I am pretty sure this is the way to go.
I applied the latest comments made by @tacaswell on #2759 except for

  • dictionnary vs classes (tool definition)
  • history singleton

If you agree, I will remove the other two PR's and we can keep going.

@tacaswell

Copy link
Copy Markdown
Member

Sounds good to me. I am still not convinced that going with a zoo of classes is the right thing to do and am still not happy with adding more global state.

@fariza

fariza commented Oct 20, 2014

Copy link
Copy Markdown
Member Author

I removed the singleton, I added another tool, that keeps the "history". The other tools access this one to push things around in history

@fariza

fariza commented Oct 21, 2014

Copy link
Copy Markdown
Member Author

@tacaswell please tag this as "need revision" and remove it from #2759

@tacaswell tacaswell modified the milestones: v1.5.x, unassigned Oct 21, 2014
@fariza

fariza commented Oct 31, 2014

Copy link
Copy Markdown
Member Author

@WeatherGod did you have time to check it out?

@WeatherGod

Copy link
Copy Markdown
Member

Hopefully, I'll have time this weekend... (book-writing is hard!)

On Fri, Oct 31, 2014 at 9:41 AM, Federico Ariza notifications@github.com
wrote:

@WeatherGod https://github.com/WeatherGod did you have time to check it
out?


Reply to this email directly or view it on GitHub
#3652 (comment)
.

@fariza fariza changed the title Navigation by events MEP22: Navigation by events Nov 7, 2014
Comment thread lib/matplotlib/backend_bases.py Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Patterns like this make me nervous, might as well just pass around a dict.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed

@fariza

fariza commented Nov 14, 2014

Copy link
Copy Markdown
Member Author

@tacaswell I gave up (too tempting).
I just added the radio_group attribute for ToolToggleBase derived tools, now it is possible to specify a group that transforms the tools in that group as "mutually exclusive" (untoggle one before toggling the other).
As per your suggestion, ToolGrid, ToolFullScreen, ToolYScale and ToolXScale are now toggle tools.

@fariza fariza force-pushed the navigation-by-events branch from a88dc2d to 5eae4e1 Compare April 7, 2015 19:14
@OceanWolf

Copy link
Copy Markdown
Member

Okay, merge time?

@WeatherGod

Copy link
Copy Markdown
Member

Congratulations, @fariza and @OceanWolf ! You are now proud owners of some mpl real estate!

WeatherGod added a commit that referenced this pull request Apr 9, 2015
@WeatherGod WeatherGod merged commit cd5edcf into matplotlib:master Apr 9, 2015
@fariza

fariza commented Apr 9, 2015

Copy link
Copy Markdown
Member Author

Thank you everybody.

Actually I am going to present a Lightning Talk at Pycon2015
Here is the notebook just in case somebody is interested https://github.com/fariza/pycon2015/blob/master/ToolDemo.ipynb

@OceanWolf

Copy link
Copy Markdown
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

MEP: MEP22 tool manager

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants