8000 backend_wx.py: ReleaseMouse() when the capture is lost by newville · Pull Request #7652 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content

backend_wx.py: ReleaseMouse() when the capture is lost #7652

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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 30 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
eac63b7
remove all CaptureMouse() and ReleaseMouse() calls
newville Dec 21, 2016
b4a083e
Merge branch 'master' of github.com:matplotlib/matplotlib
newville Dec 22, 2016
a8437a9
avoiding wx C++ assertions by handling Capture Lost and Changed events
newville Dec 22, 2016
331e6f7
Merge branch 'master' of github.com:matplotlib/matplotlib
newville Dec 24, 2016
0d5d1d5
now with _set_capture() method so that Capture is always released bef…
newville Dec 24, 2016
6135b14
Decode error messages from image converters.
QuLogic Dec 22, 2016
c96d50e
Also decode stdout from image verifiers.
QuLogic Dec 22, 2016
2d7b735
Make style change examples consistent
dstansby Dec 23, 2016
75a4986
Make plot titles consistent
dstansby Dec 23, 2016
8e45f4d
Allow to store metadata in png files
Xarthisius Oct 25, 2016
afaa4c4
Ensure that metadata pointer is initially set to NULL
Xarthisius Oct 25, 2016
26a8af8
Allow to pass custom infoDict to images created with pdf backend
Xarthisius Oct 25, 2016
15999fe
Allow to pass custom metadata to png images created with agg backend
Xarthisius Oct 25, 2016
80b2361
Allow to pass custom Creator to images created with ps backend
Xarthisius Oct 25, 2016
095db35
'Software' starts with capital letter as per PNG specification
Xarthisius Oct 25, 2016
19e9ad8
fix pep8 issue
Xarthisius Oct 25, 2016
17e8231
Drop debug statements
Xarthisius Oct 25, 2016
9fea731
Preserve the default values of the metadata. Allow user to update if …
Xarthisius Oct 25, 2016
cdc2185
Revert accidental changes and fix indentation
Xarthisius Oct 27, 2016
fa42ced
Handle unicode/bytes directly in the C extension
Xarthisius Oct 27, 2016
f0681de
Use 'latin_1' encoding instead of ascii
Xarthisius Oct 29, 2016
7912f00
Fix numpydoc format issues
Xarthisius Oct 29, 2016
2a5e3b0
Add example info dictionary
Xarthisius Oct 29, 2016
2ba99e1
Add a description for the 'metadata' keyword to the docstring
Xarthisius Oct 31, 2016
ad1dad9
Explicitly define 'metadata' kwarg in '_print_figure'
Xarthisius Oct 31, 2016
46afd9f
Define 'metadata' as kwarg in _print_figure_tex for consistency
Xarthisius Oct 31, 2016
7c2a94d
Use default value for invalid key instead of NULL
Xarthisius Oct 31, 2016
a499650
Use OrderedDict for metadata
Xarthisius Nov 17, 2016
5afb67a
Add 'what is new' entry for metadata kwarg in matplotlib.pyplot.savefig
Xarthisius Nov 17, 2016
5302ff7
Fix merge
Xarthisius Dec 25, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Preserve the default values of the metadata. Allow user to update if …
…necessary
  • Loading branch information
Xarthisius authored and newville committed Dec 27, 2016
commit 9fea731216d2ce34e65bc36c55cb8ed55392904c
16 changes: 9 additions & 7 deletions lib/matplotlib/backends/backend_agg.py
Original file line number Diff line number Diff line change
Expand Up @@ -554,14 +554,16 @@ def print_png(self, filename_or_obj, *args, **kwargs):
else:
close = False

metadata = kwargs.pop("metadata", None)
if metadata is None:
version_str = 'matplotlib version ' + __version__ + \
', http://matplotlib.org/'
metadata = {six.b('Software'): six.b(version_str)}
version_str = 'matplotlib version ' + __version__ + \
', http://matplotlib.org/'
metadata = {six.b('Software'): six.b(version_str)}
user_metadata = kwargs.pop("metadata", None)
if user_metadata is not None:
metadata.update(user_metadata)

try:
_png.write_png(renderer._renderer, filename_or_obj, self.figure.dpi,
metadata=metadata)
_png.write_png(renderer._renderer, filename_or_obj,
self.figure.dpi, metadata=metadata)
finally:
if close:
filename_or_obj.close()
Expand Down
15 changes: 7 additions & 8 deletions lib/matplotlib/backends/backend_pdf.py
Original file line number Diff line number Diff line change
Expand Up @@ -482,15 +482,14 @@ def __init__(self, filename, metadata=None):
else:
source_date = datetime.today()

self.infoDict = {
'Creator': 'matplotlib ' + __version__ +
', http://matplotlib.org',
'Producer': 'matplotlib pdf backend%s' % revision,
'CreationDate': source_date
}
if metadata is not None:
self.infoDict = metadata
else:
self.infoDict = {
'Creator': 'matplotlib ' + __version__ +
', http://matplotlib.org',
'Producer': 'matplotlib pdf backend%s' % revision,
'CreationDate': source_date
}
self.infoDict.update(metadata)

self.fontNames = {} # maps filenames to internal font names
self.nextFont = 1 # next free internal font name
Expand Down
0