# Plotly Express axis labels

**URL:** <https://community.plotly.com/t/plotly-express-axis-labels/25368>\
**Category:** 📊 Plotly Python\
**Created:** [July 3, 2019, 8:15am UTC](https://community.plotly.com/t/plotly-express-axis-labels/25368 "2019-07-03T08:15:59Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![vhphan](https://avatars.discourse-cdn.com/v4/letter/v/bcef8e/32.png) [@vhphan](https://community.plotly.com/u/vhphan)\
**Post date:** [July 3, 2019, 8:15am UTC](https://community.plotly.com/t/plotly-express-axis-labels/25368/1 "2019-07-03T08:15:59Z")

</div>

How do I change the axis labels in a plot?

px.line(… labels={})

What do I put in the labels dictionary? I can’t seem to find any examples online or in the documentation.

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![Giri](https://avatars.discourse-cdn.com/v4/letter/g/8baadc/32.png) [@Giri](https://community.plotly.com/u/Giri)\
**Post date:** [March 9, 2020, 8:02am UTC](https://community.plotly.com/t/plotly-express-axis-labels/25368/2 "2020-03-09T08:02:01Z")

</div>

To change the x label or y label you can use the labels.

eg:

px.bar(data, x=months, y=‘Sales’, labels = {‘x’:‘Month’})

- data is the data dataframe
- months is a separate list of the months [‘Jan’,‘Feb’,…‘Dec’]

Hope this helps you 🙂
