# X axis on top ánd bottom

**URL:** <https://community.plotly.com/t/x-axis-on-top-and-bottom/38990>\
**Category:** Dash Python\
**Created:** [May 6, 2020, 2:08pm UTC](https://community.plotly.com/t/x-axis-on-top-and-bottom/38990 "2020-05-06T14:08:44Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![IvoB](https://avatars.discourse-cdn.com/v4/letter/i/6a8cbe/32.png) [@IvoB](https://community.plotly.com/u/IvoB)\
**Post date:** [May 6, 2020, 2:08pm UTC](https://community.plotly.com/t/x-axis-on-top-and-bottom/38990/1 "2020-05-06T14:08:44Z")

</div>

**Dear readers,**

In a scatter plot I want to plot the x-axis labels at the bottom (as default) and also at the top of the plot. Is this possible ?

I explored the secondary\_y options, but this does not exist for the x-axis. Also [https://plotly.com/python/multiple-axes/](https://plotly.com/python/multiple-axes/) does not mention an axis on the bottom and top at the same time. Using annotations is not satisfying either. Is there an option to select the x-axis label on both sides ?

Any suggestions here ?

KR,  
IvoB

---

<div class="post-metadata">

**Author:** ![marketemp](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/marketemp/32/11523_2.png) [@marketemp](https://community.plotly.com/u/marketemp)\
**Post date:** [December 14, 2023, 5:19pm UTC](https://community.plotly.com/t/x-axis-on-top-and-bottom/38990/2 "2023-12-14T17:19:45Z")

</div>

This didn’t get answered in 2020 and it’s almost 2024, but I am also in need of the capacity to have lavels at the top AND bottom of my graph. Any ideas or possibilities this could become a requirement in the future?

---

<div class="post-metadata">

**Author:** ![AIMPED](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/aimped/32/21758_2.png) [@AIMPED](https://community.plotly.com/u/AIMPED)\
**Post date:** [December 14, 2023, 6:03pm UTC](https://community.plotly.com/t/x-axis-on-top-and-bottom/38990/3 "2023-12-14T18:03:04Z")

</div>

I’m probably misunderstanding something, could this post be helpful in any way?

> [@How do I stack multiple x axes on the bottom of my chart?](https://community.plotly.com/t/how-do-i-stack-multiple-x-axes-on-the-bottom-of-my-chart/77611):
>
> Hello, I have a scatter plot chart with multiple x axes. I am following a code example that puts one x axis on the top and the other on the bottom like so: [x-axis on top and bottom] The code looks like this: var trace1 = { x: [1, 2, 3], y: [40, 50, 60], name: 'yaxis data', type: 'scatter' }; var trace2 = { x: [12, 13, 14], y: [4, 5, 6], name: 'yaxis2 data', xaxis: 'x2', type: 'scatter' }; var data = [trace1, trace2]; var layout = { yaxis: {title: 'yaxis title'}, …
