Search code examples
pythonplotly

Plotly only plots in grey


When I generate a graph using plotly, there is no color. All graphs are grey. They look and interact fine, except it's like I set all the colors to the same shade of grey. For instance, if I run the code below, I get this image.

import plotly.express as px
df = px.data.gapminder()
fig = px.area(df, x="year", y="pop", color="continent", line_group="country")
fig.show()

enter image description here

Help?


Solution

  • Apparently I had changed the default template. Using this fixed it:

    plotly.io.templates.default = "plotly"