• python
  • javascript
  • reactjs
  • sql
  • c#
  • java
Facebook Twitter Instagram
Devs Fixed
  • python
  • javascript
  • reactjs
  • sql
  • c#
  • java
Devs Fixed
Home ยป Resolved: Plot multiple lines into the same chart over time from pandas group by result using plotly

Resolved: Plot multiple lines into the same chart over time from pandas group by result using plotly

0
By Isaac Tonny on 17/06/2022 Issue
Share
Facebook Twitter LinkedIn

Question:

I want to plot multiple lines in the same chart over time from a pandas groubby result. My data looks the following
Now I am grouping my data by month and direction
Which gives me
How would I plot this in a line chart? On the x-Axis I want the time, on the y-Axis the count and for each group within direction I want a line. Preferably using Plotly.

Answer:

I don’t have the expected graph, so I understood from the comments that the graph was to be a line chart of a time series with two different line types. I used a graph object and a loop process to graph the line mode of the scatter plot in the directional units.
enter image description here

If you have better answer, please add a comment about this, thank you!

pandas plotly python
Share. Facebook Twitter LinkedIn

Related Posts

Resolved: Why when i change manualy the url on my react page it ignores the .css file?

24/03/2023

Resolved: navigate and redirect not redirecting to path in react router

24/03/2023

Resolved: Time Complexity: Find the number of people who know a secret leetcode 2327

24/03/2023

Leave A Reply

© 2023 DEVSFIX.COM

Type above and press Enter to search. Press Esc to cancel.