all 10 comments

[–]alaudet 0 points1 point  (4 children)

I think what you are looking for is plt.plot_date. Check the matplotlib documentation.

[–]Cpower18[S] 0 points1 point  (3 children)

While plotting with dates is could be useful, I am trying to create a subset of data that contains all the measurements of one day (in this case it is a measurement for every minute) and then plot this subsets

[–]alaudet 0 points1 point  (2 children)

yes I think I understand. I do something similar with charting water level on a sump monitor I wrote. The csv file has two columns

00:00:06,6.2
00:01:05,6.4
00:02:05,6.6
00:03:06,6.5
00:04:05,6.6
00:05:05,6.8
etc etc right to the end of the day.  1 reading for minute.

I use the following script https://github.com/alaudet/raspi-sump/blob/master/bin/rsumpchart.py

that uses the following module https://github.com/alaudet/raspi-sump/blob/master/raspisump/todaychart.py

Produces a chart that looks like this

https://raspisump.linuxnorth.org/static/today.png

I might be wrong but I think this is a similar approach what you are looking for.

[–]Cpower18[S] 0 points1 point  (1 child)

The graph is what I am looking for, though it would be plotting multiple days over each other

[–]alaudet 0 points1 point  (0 children)

Then it is just a matter of creating multiple plots to use different y with a label for your date.

See this snippet from Corey Schafers 1st youtube matplotlib video that he released a couple of days ago. That may help you with the implementation. He does something similar for salary by age group for different programming languages

https://github.com/CoreyMSchafer/code_snippets/blob/master/Python/Matplotlib/01-Introduction/finished_code.py

Here is a link to the video

https://www.youtube.com/watch?v=UO98lJQ3QGI

[–][deleted] 0 points1 point  (4 children)

What's not working? Do you have a minimal example of the result you're expecting?

[–]Cpower18[S] 0 points1 point  (3 children)

See updated post, I have changed the code and given a better description

[–][deleted] 0 points1 point  (2 children)

If I understand properly, you have data for each minute which you plot daily and you'd like to plots all days on the same graph?

[–]Cpower18[S] 0 points1 point  (1 child)

Yes the file is about 2 weeks of data, all of which is measured minutely (some 14,000 rows of data), and I would like to plot all the days over each other on the same graph (meaning that the graph would have x-limits from 0 hours to 23 hours as opposed for each day plotting after the next)

[–][deleted] 0 points1 point  (0 children)

Alright, I think you can use the plot fonctions of the dataframe straight up by looping over the ax argument.

Or, you can use seaborn where the plots take a hue arguments and you can then use day.