# How can I make the y axis sort by time?

**URL:** <https://community.plotly.com/t/how-can-i-make-the-y-axis-sort-by-time/67117>\
**Category:** 📊 Plotly Python\
**Tags:** question\
**Created:** [August 18, 2022, 9:58pm UTC](https://community.plotly.com/t/how-can-i-make-the-y-axis-sort-by-time/67117 "2022-08-18T21:58:42Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![joehuang](https://avatars.discourse-cdn.com/v4/letter/j/76d3ee/32.png) [@joehuang](https://community.plotly.com/u/joehuang)\
**Post date:** [August 18, 2022, 9:58pm UTC](https://community.plotly.com/t/how-can-i-make-the-y-axis-sort-by-time/67117/1 "2022-08-18T21:58:42Z")

</div>

I have a `dataframe` like this, the elements in `dataframe` all are `datetime.time` (not string):

![image](https://us1.discourse-cdn.com/flex024/uploads/plot/original/3X/3/0/30ae28bc00918b7a8a67c11bddb040b9f8cd2c79.png)

And I plot it by `px.scatter(df)`:

 ![image](https://us1.discourse-cdn.com/flex024/uploads/plot/original/3X/2/0/20cf8fdd4c76a8f2dba67a490671381c5463af0c.png)

How can I make the y axis sort by time?

---

<div class="post-metadata">

**Author:** ![steviesblog](https://avatars.discourse-cdn.com/v4/letter/s/ce7236/32.png) [@steviesblog](https://community.plotly.com/u/steviesblog)\
**Post date:** [August 24, 2022, 4:43pm UTC](https://community.plotly.com/t/how-can-i-make-the-y-axis-sort-by-time/67117/2 "2022-08-24T16:43:39Z")

</div>

hi @joehuang

came across the same issue but have not found a solution. My topic is here: [Timestamps y-axis in px.scatter](https://community.plotly.com/t/timestamps-y-axis-in-px-scatter/52683)
