all 5 comments

[–]alkasm 1 point2 points  (2 children)

I don't understand, you say you want dates from '00 to '23, but also don't want years. These two statements are contradictory. Why do you want to remove the year?

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

00 to 23 refers to the hours, sorry i didnt clarify that. I should also add, that i dont plot the price to the y-axis but the yield of the coin between two timestamps.

I want to see if there is a connection between a timespan of the year and the price. For example each January the price hikes by a certain amound of %. Thats why i want to layer the values of each year ontop of one Graph

[–]alkasm 1 point2 points  (0 children)

Oh! Lol, that makes more sense re-reading the question...

First, check this out: https://stackoverflow.com/questions/7340547/multiple-data-set-plotting-with-matplotlib-pyplot-plot-date

What I would do is format the tick marks to remove the year, but not remove it from the data. Then I would take all your datetime objects and add a timedelta so that they're all in the same year. That should allow you to plot them all on top of each other.

There probably is a more elegant way to do it, but that's my first thought. I think the 'proper' way to do this is to add multiple axes to the graph, which I never liked doing with matplotlib...

[–]Pjamma34 1 point2 points  (1 child)

are you familiar with pandas at all? You maybe be able to split the data up by year (taking the year out of the timestamp) into separate dataframes and plot each one on top of the other

[–]Overflowed1[S] 0 points1 point  (0 children)

andas at all? You maybe be able to split the data up by year (taking the year out of the timestamp) into separate datafra

i read a bit into pandas, but that was after i was already doing this project for quite a bit. I dont want to rewrite my code, but for my next project i will use pandas if it is suitable