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

make SubplotTool into a modal dialog, keep ref to SubplotTool#9899

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
jklymak merged 1 commit intomatplotlib:masterfrommattip:tkagg-modal-subplot
Dec 1, 2017
Merged

make SubplotTool into a modal dialog, keep ref to SubplotTool#9899

jklymak merged 1 commit intomatplotlib:masterfrommattip:tkagg-modal-subplot
Dec 1, 2017

Conversation

mattip
Copy link
Contributor

In using matplotlib (after PR#9356) on PyPy, I ran into an issue that theTkAGGSubplotTool python object was being collected by the PyPy garbage collector (GC). It turns out that theSubplotTool holds circular references, and these are resolved in the CPython GC much much later than in PyPy. I also noticed that theSubPlotTool onTkAGG is not a modal window, I can open many at the same time.

PR Summary

This pull request solves both problems: holds a reference to theSubplotTool and makes the dialog into a modal dialog.

Here is code that provides a basis for a manual test, I am not sure how to test the modality of a dialog box via a unittest:

import matplotlibmatplotlib.use('TkAgg')from matplotlib import pylabfig = pylab.plot(range(10))pylab.show()# press the subplot button in the toolbar# try to press the button again, the SubplotTool dialog should hold focus# make sure the SubplotTool is functioning, that the sliders affect the main window

PR Checklist

  • Has Pytest style unit tests
  • Code is PEP 8 compliant
  • New features are documented, with examples if plot related
  • Documentation is sphinx and numpydoc compliant
  • Added an entry to doc/users/next_whats_new/ if major new feature (follow instructions in README.rst there)
  • Documented in doc/api/api_changes.rst if API changed in a backward-incompatible way

@tacaswelltacaswell added this to thev2.2 milestoneDec 1, 2017
Copy link
Member

@jklymakjklymak left a comment

Choose a reason for hiding this comment

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

This works for me (and I can confirm the original bug).

@jklymakjklymak merged commit1293916 intomatplotlib:masterDec 1, 2017
@mattipmattip deleted the tkagg-modal-subplot branchDecember 2, 2017 15:42
@QuLogicQuLogic modified the milestones:needs sorting,v2.2.0Feb 12, 2018
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@tacaswelltacaswelltacaswell approved these changes

@jklymakjklymakjklymak approved these changes

Assignees
No one assigned
Labels
Projects
None yet
Milestone
v2.2.0
Development

Successfully merging this pull request may close these issues.

5 participants
@mattip@tacaswell@jklymak@QuLogic@dstansby

[8]ページ先頭

©2009-2025 Movatter.jp