Example code:
<code>
import numpy as np
from plotly.offline import plot
import plotly.graph_objs as go
import plotly.io as pio
from IPython.display import display, HTML
pio.templates.default = "plotly_white"
x = np.random.rand(2000)
y = np.random.randn(2000)
trc = go.Scatter(x=x, y=y, mode='markers', marker=dict(
color='blue', size=4)
)
display(HTML(plot([trc], output_type="div")))
</code>
<code>
import numpy as np
from plotly.offline import plot
import plotly.graph_objs as go
import plotly.io as pio
from IPython.display import display, HTML
pio.templates.default = "plotly_white"
x = np.random.rand(2000)
y = np.random.randn(2000)
trc = go.Scatter(x=x, y=y, mode='markers', marker=dict(
color='blue', size=4)
)
display(HTML(plot([trc], output_type="div")))
</code>
import numpy as np
from plotly.offline import plot
import plotly.graph_objs as go
import plotly.io as pio
from IPython.display import display, HTML
pio.templates.default = "plotly_white"
x = np.random.rand(2000)
y = np.random.randn(2000)
trc = go.Scatter(x=x, y=y, mode='markers', marker=dict(
color='blue', size=4)
)
display(HTML(plot([trc], output_type="div")))
Output image below – specifying the theme as plotly_dark
results in a white background plot, but the marker color stays yellow. Also, when saving the file from the plot menu the colors are correct, it’s just the display that is wrong. Any idea what could be the reason?