The following block of code introduces nondeterminism in the mode of a plotly express trace, because it involves iterating over a set:
https://github.com/plotly/plotly.py/blob/v5.18.0/packages/python/plotly/plotly/express/_core.py#L1922-L1931
Among other things, this causes the output of plotly.graph_objects.Figure.to_html to be non-deterministic, because sometimes the mode for a line plot with markers is "lines+markers" and other times it is "markers+lines". This makes it difficult to test for consistency of results during automated tests.
One potential solution might be to replace the following:
- trace_patch["mode"] = "+".join(modes)
+ trace_patch["mode"] = "+".join(sorted(modes))
Alternatively, modes could be constructed as a list instead of a set.
The following block of code introduces nondeterminism in the
modeof a plotly express trace, because it involves iterating over aset:https://github.com/plotly/plotly.py/blob/v5.18.0/packages/python/plotly/plotly/express/_core.py#L1922-L1931
Among other things, this causes the output of
plotly.graph_objects.Figure.to_htmlto be non-deterministic, because sometimes themodefor a line plot with markers is"lines+markers"and other times it is"markers+lines". This makes it difficult to test for consistency of results during automated tests.One potential solution might be to replace the following:
Alternatively,
modescould be constructed as a list instead of a set.