I am trying to create multiple lines on the same graph using plotly express. According to this thread on this forum, I should be able to simply put two columns from my dataframe in brackets. But I can’t actually get that to work, even when I directly copy/paste the example code into Google Colab. Does this no longer work?
This should definitely work but you’ll need a recent version of
plotly. The current latest is 5.4.0 and I believe the syntax you’re referring to arrived in 4.9.0
Looking at your notebook, it’s using
plotly v4.4.1 (checked with
import plotly; plotly.__version__) so you’ll need to run
!pip install -U plotly or similar.
Thank you so much! This got me where I needed in my head, though ultimately I ended up having to do the graph a different way in Graph Objects to do the cool stuff I wanted. When the blog gets published I’ll share the link!