Skip to content
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

Send colors to lower case #5

Open
jnumainville opened this issue Jul 25, 2023 · 2 comments
Open

Send colors to lower case #5

jnumainville opened this issue Jul 25, 2023 · 2 comments
Labels
bug Something isn't working plotly-express Involves plotly-express plugin Python Involves Python side of a plugin

Comments

@jnumainville
Copy link
Collaborator

non lowercase colors do not render properly with webgl (which we use by default), but do with svg.
This is technically a plotly bug, but we can have a workaround of send colors to lower case to fix

All black here:

import deephaven.plot.express as dx
my_table = dx.data.iris(ticking=False)
scatter_plot_color_map = dx.scatter(
    my_table,
    x="sepal_width",
    y="sepal_length",
    color="species",
    # set a series to a specific color
    color_discrete_map=[{"virginica":"LemonChiffon", "setosa": "CornflowerBlue", "versicolor":"Salmon"}]
)

Fine here:

import deephaven.plot.express as dx
my_table = dx.data.iris(ticking=False)
scatter_plot_color_map = dx.scatter(
    my_table,
    x="sepal_width",
    y="sepal_length",
    color="species",
    # set a series to a specific color
    color_discrete_map={"virginica":"lemonchiffon", "setosa": "cornflowerblue", "versicolor":"salmon"}
)
@jnumainville jnumainville added the bug Something isn't working label Jul 25, 2023
@jnumainville
Copy link
Collaborator Author

Plotly js issue: plotly/plotly.js#6685

@jnumainville jnumainville transferred this issue from deephaven/deephaven-plugin-plotly-express Sep 11, 2023
@jnumainville jnumainville added Python Involves Python side of a plugin plotly-express Involves plotly-express plugin labels Sep 11, 2023
@mofojed
Copy link
Member

mofojed commented Jul 4, 2024

Fixed in plotly: plotly/plotly.js#6928
That made it into v2.30.1: https://github.com/plotly/plotly.js/releases/tag/v2.30.1
We should just update plotly to resolve this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working plotly-express Involves plotly-express plugin Python Involves Python side of a plugin
Projects
None yet
Development

No branches or pull requests

2 participants