-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Non-determinism of mode
for a plotly express line plot with markers
#4428
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
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The following block of code introduces nondeterminism in the
mode
of 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_html
to be non-deterministic, because sometimes themode
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:
Alternatively,
modes
could be constructed as a list instead of a set.The text was updated successfully, but these errors were encountered: