-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
MAINT: Deterministic SVG and PDF tests #7748
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
Changes from 1 commit
529afdc
8c7adbb
93b2eea
eab297c
ec941b4
749e81f
6736f7d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,26 @@ | ||
Reproducible PS and PDF output | ||
------------------------------ | ||
Reproducible PS, PDF and SVG output | ||
----------------------------------- | ||
|
||
The ``SOURCE_DATE_EPOCH`` environment variable can now be used to set | ||
the timestamp value in the PS and PDF outputs. See | ||
https://reproducible-builds.org/specs/source-date-epoch/ | ||
|
||
Alternatively, calling ``savefig`` with ``metadata={creationDate=None}`` | ||
will omit the timestamp altogether. | ||
|
||
The reproducibility of the output from the PS and PDF backends has so | ||
far been tested using various plot elements but only default values of | ||
options such as ``{ps,pdf}.fonttype`` that can affect the output at a | ||
low level, and not with the mathtext or usetex features. When | ||
matplotlib calls external tools (such as PS distillers or LaTeX) their | ||
versions need to be kept constant for reproducibility, and they may | ||
add sources of nondeterminism outside the control of matplotlib. | ||
|
||
For SVG output, the ``svg.hashsalt`` rc parameter has been added in an | ||
earlier release. In can be used to change some random id values in the | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In -> It |
||
output to be deterministic, at the cost that including multiple such | ||
svg files in one document can lead to collisions. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. svg -> SVG |
||
|
||
These features are now enabled in the tests for the pdf and svg | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. pdf -> PDF |
||
backends, so most test output files (but not all of them) are now | ||
deterministic. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This
dict
literal is a bit broken; should bedict(creationDate=None)
or{'creationDate': None}
.