# Title Alignment Python

**URL:** <https://community.plotly.com/t/title-alignment-python/30820>\
**Category:** 📊 Plotly Python\
**Created:** [November 3, 2019, 12:07am UTC](https://community.plotly.com/t/title-alignment-python/30820 "2019-11-03T00:07:13Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![chen0095](https://avatars.discourse-cdn.com/v4/letter/c/a9a28c/32.png) [@chen0095](https://community.plotly.com/u/chen0095)\
**Post date:** [November 3, 2019, 12:07am UTC](https://community.plotly.com/t/title-alignment-python/30820/1 "2019-11-03T00:07:13Z")

</div>

I’m trying to plot a simple bar chart, and the title, when I add it via fig.update\_layout , seems to automatically align to the left of the chart. How can I change the title settings such that the title of the bar chart aligns with the center of the graph?

I noticed that there was some discussion for this but for plotly.js a while back ([https://github.com/plotly/plotly.js/issues/882](https://github.com/plotly/plotly.js/issues/882)) , and that there is a xanchor attribute for the title that takes in parameters for left/right/center/auto. However, in changing the xanchor value, the title does not align with the center of the graph with any of the attribute values.

An example of what I’d like to do is to move the “January 2013 Sales Report” Title from the following graph: [https://plot.ly/python/bar-charts/#bar-chart-with-hover-text](https://plot.ly/python/bar-charts/#bar-chart-with-hover-text)

from the left to the center of the image. Can anyone point me in the correct direction?

Thanks!

---

<div class="post-metadata">

**Author:** ![empet](https://avatars.discourse-cdn.com/v4/letter/e/977dab/32.png) [@empet](https://community.plotly.com/u/empet)\
**Post date:** [November 3, 2019, 10:28am UTC](https://community.plotly.com/t/title-alignment-python/30820/2 "2019-11-03T10:28:57Z")

</div>

@chen0095 To get a centered title perform the following layout update:

`fig.update_layout(title_text='Your title', title_x=0.5)`
