Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 9840805

Browse files
committed
Add 'what is new' entry for metadata kwarg in matplotlib.pyplot.savefig
1 parent 716a7b7 commit 9840805

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
Metadata savefig kwarg
2+
----------------------
3+
4+
:func:`~matplotlib.pyplot.savefig` now accepts `metadata` as a keyword argument.
5+
It can be used to store key/value pairs in the image metadata.
6+
7+
Supported formats and backends
8+
``````````````````````````````
9+
* 'png' with Agg backend
10+
* 'pdf' with PDF backend (see
11+
:func:`~matplotlib.backends.backend_pdf.PdfFile.writeInfoDict` for a list of
12+
supported keywords)
13+
* 'eps' and 'ps' with PS backend (only 'Creator' key is accepted)
14+
15+
Example
16+
```````
17+
::
18+
19+
plt.savefig('test.png', metadata={'Software': 'My awesome software'})
20+

0 commit comments

Comments
 (0)