9c7f926d6d70a994c3710ce570bb9807519ef090,lib/matplotlib/backends/backend_agg.py,FigureCanvasAgg,print_png,#FigureCanvasAgg#Any#,456
Before Change
version_str = (
"matplotlib version " + __version__ + ", http://matplotlib.org/")
metadata = OrderedDict({"Software": version_str})
user_metadata = kwargs.pop("metadata", None)
if user_metadata is not None:
metadata.update(user_metadata)
with cbook._setattr_cm(renderer, dpi=self.figure.dpi), \
After Change
buf, size = self.print_to_buffer()
// Only use the metadata kwarg if pnginfo is not set, because the
// semantics of duplicate keys in pnginfo is unclear.
if "pnginfo" not in pil_kwargs:
pnginfo = PngInfo()
for k, v in metadata.items():
pnginfo.add_text(k, v)
pil_kwargs["pnginfo"] = pnginfo
pil_kwargs.setdefault("dpi", (self.figure.dpi, self.figure.dpi))
(Image.frombuffer("RGBA", size, buf, "raw", "RGBA", 0, 1)
.save(filename_or_obj, format="png", **pil_kwargs))
In pattern: SUPERPATTERN
Frequency: 4
Non-data size: 3
Instances
Project Name: matplotlib/matplotlib
Commit Name: 9c7f926d6d70a994c3710ce570bb9807519ef090
Time: 2019-01-17
Author: anntzer.lee@gmail.com
File Name: lib/matplotlib/backends/backend_agg.py
Class Name: FigureCanvasAgg
Method Name: print_png
Project Name: gboeing/osmnx
Commit Name: d08ad6bab50eacd02554f9b037f33280ccf28b87
Time: 2019-05-19
Author: webmail@nickbristow.co.uk
File Name: osmnx/footprints.py
Class Name:
Method Name: create_footprints_gdf
Project Name: neurosynth/neurosynth
Commit Name: 40132b3ada426eda00f7f58b4eed9a78fff48bb6
Time: 2014-10-30
Author: tyarkoni@gmail.com
File Name: neurosynth/base/mask.py
Class Name: Masker
Method Name: remove
Project Name: bokeh/bokeh
Commit Name: 0eb511b14a0b157c212be7a4a158b891949e11df
Time: 2015-09-07
Author: nroth@dealnews.com
File Name: bokeh/charts/_data_source.py
Class Name: ChartDataSource
Method Name: from_data