Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I currently have code that plots data from a CSV using matplotlib. The problem is the math I am trying to run is time dependant, and when I set my x-axis to float(time.strftime("%M%S")), using the datetime module, there's a gap in the plotted graph between 60-100, as the time value is base 60, unlike the base 10 float number system, so is there any way to fix this, by making the float base 60?

apologies for the rush

question from:https://stackoverflow.com/questions/65952315/is-it-possible-to-make-a-base-60-float

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
807 views
Welcome To Ask or Share your Answers For Others

1 Answer

convert M and S separately, and just M + S/60. You have a lot of simple solution. I wonder why the idea of "base 60 float" (ok, what I did it is just a base 60 calculation, but it is simpler to interpret as minute, seconds, then thinking about base 60) -Giacomo Catenazzi


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...