# Plotly Chart - Same Height with Width

**URL:** <https://discuss.streamlit.io/t/plotly-chart-same-height-with-width/23314>\
**Category:** Using Streamlit\
**Tags:** plotly\
**Created:** [March 20, 2022, 6:46am UTC](https://discuss.streamlit.io/t/plotly-chart-same-height-with-width/23314 "2022-03-20T06:46:27Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![bimgeek](https://sea2.discourse-cdn.com/streamlit/user_avatar/discuss.streamlit.io/bimgeek/32/14184_2.png) [@bimgeek](https://discuss.streamlit.io/u/bimgeek)\
**Post date:** [March 20, 2022, 6:46am UTC](https://discuss.streamlit.io/t/plotly-chart-same-height-with-width/23314/1 "2022-03-20T06:46:27Z")

</div>

Hey guys,

Basically I added a pychart to my column and I set its width as the column width using`st.plotly_chart(fig, use_container_width=True)`. The thing is I cant set the height of the chart so it’ll have the same value as width. I don’t want to set an integer value. Any idea how can I do that?  
See the image below👇. There is a huge gap between the markdown list and the chart.

 ![image](https://global.discourse-cdn.com/streamlit/original/2X/c/c51409b1331dab41aef108832ed2c48cc20e2e3f.png)

---

<div class="post-metadata">

**Author:** ![cualr](https://avatars.discourse-cdn.com/v4/letter/c/ec9cab/32.png) [@cualr](https://discuss.streamlit.io/u/cualr)\
**Post date:** [March 29, 2022, 1:54pm UTC](https://discuss.streamlit.io/t/plotly-chart-same-height-with-width/23314/2 "2022-03-29T13:54:10Z")

</div>

You may want to try the “update\_layout”, it has an autosize option and you can define the width and height. More details can be found at the following Plotly page [Layout with Python](https://plotly.com/python/reference/layout/)

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/streamlit/original/3X/c/f/cf4c2ee0d938358f82448c5fe4b9c3c91d7ce19c.svg) [@system](https://discuss.streamlit.io/u/system)\
**Post date:** [March 29, 2023, 1:54pm UTC](https://discuss.streamlit.io/t/plotly-chart-same-height-with-width/23314/3 "2023-03-29T13:54:20Z")

</div>

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
