-
-
Notifications
You must be signed in to change notification settings - Fork 8.4k
[Bug]: Nondeterminism in SVG clipPath element id attributes #27831
Copy link
Copy link
Closed
Labels
Difficulty: Mediumhttps://matplotlib.org/devdocs/devel/contribute.html#good-first-issueshttps://matplotlib.org/devdocs/devel/contribute.html#good-first-issuesGood first issueOpen a pull request against these issues if there are no active ones!Open a pull request against these issues if there are no active ones!backend: svgstatus: confirmed bug
Milestone
Metadata
Metadata
Assignees
Labels
Difficulty: Mediumhttps://matplotlib.org/devdocs/devel/contribute.html#good-first-issueshttps://matplotlib.org/devdocs/devel/contribute.html#good-first-issuesGood first issueOpen a pull request against these issues if there are no active ones!Open a pull request against these issues if there are no active ones!backend: svgstatus: confirmed bug
Type
Fields
Give feedbackNo fields configured for issues without a type.
Bug summary
Hello - I'm trying to make the
astroplandocumentation build reproducibly in Debian, and have found a snag: despite configuring thesvg.hashsaltto successfully makepathidentifiers in some SVG plots generated bymatplotlibdeterministic, there is a remaining problem thatclipPathidentifiers are nondeterministic.The cause appears to be the use of Python object ID (via
id(...)calls here) when generatingclippathIDs.Code for reproduction
Actual outcome
Differences appear in the
clipPathidentifiers and their references from elsewhere in the SVG output.Expected outcome
When an
svg.hashsaltvalue is configured, the SVG output should be deterministic.Additional information
This could arguably be an enhancement request rather than a bug.
Configuring a static
PYTHONHASHSEEDvalue does not help to produce deterministic results.Operating system
Debian GNU/Linux (trixie)
Matplotlib Version
3.6.3
Matplotlib Backend
TkAgg
Python version
Python 3.11.8
Jupyter version
N/A
Installation
Linux package manager