# Timedelta formats in plotly plot

**URL:** <https://community.plotly.com/t/timedelta-formats-in-plotly-plot/50956>\
**Category:** 📊 Plotly Python\
**Created:** [March 12, 2021, 4:50pm UTC](https://community.plotly.com/t/timedelta-formats-in-plotly-plot/50956 "2021-03-12T16:50:03Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![samj](https://avatars.discourse-cdn.com/v4/letter/s/77aa72/32.png) [@samj](https://community.plotly.com/u/samj)\
**Post date:** [March 12, 2021, 4:50pm UTC](https://community.plotly.com/t/timedelta-formats-in-plotly-plot/50956/1 "2021-03-12T16:50:03Z")

</div>

I am trying to visualise some data for work, and my manager wants me to create a continuous timeline from 2018 to 2021, indicating where there are gaps. I would like to plot a graph with my Date column on the x axis, and Time\_difference on the y axis, with the Time\_analysis column as the key/colour code. I tried some code, but unfortunately, the format of the Time\_difference column doesn’t come out on the plot the way I’d like it to. Is there a way I can change it so that it reads ‘0 days 00:00:00’ on the y axis, for example?

Also, what is the best way to save plotly plots to a png?

Thanks!

 ![Screenshot 2021-03-12 at 11.12.59](https://us1.discourse-cdn.com/flex024/uploads/plot/original/2X/2/2f57d192f390ee2ea3e7dbaa4740539a958d73b6.jpeg)  
 ![Screenshot 2021-03-12 at 16.17.11](https://us1.discourse-cdn.com/flex024/uploads/plot/original/2X/c/c634a43f0c28e6739ac5168fb79a4fff091ded5e.jpeg)

---

<div class="post-metadata">

**Author:** ![krishvk](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/krishvk/32/18215_2.png) [@krishvk](https://community.plotly.com/u/krishvk)\
**Post date:** [March 5, 2025, 2:02am UTC](https://community.plotly.com/t/timedelta-formats-in-plotly-plot/50956/3 "2025-03-05T02:02:46Z")

</div>

Issue is open here [Plotting DataFrame with timedelta64 (y-axis) · Issue #801 · plotly/plotly.py · GitHub](https://github.com/plotly/plotly.py/issues/801) with a few workarounds
