# Plotly dash graphs

**URL:** https://community.plotly.com/t/plotly-dash-graphs/62969
**Category:** 📊 Plotly Python
**Created:** [April 12, 2022, 9:16am UTC](https://community.plotly.com/t/plotly-dash-graphs/62969 "2022-04-12T09:16:19Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![shailu1391](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/shailu1391/32/18076_2.png) [@shailu1391](https://community.plotly.com/u/shailu1391)
#### Post date: [April 12, 2022, 9:16am UTC](https://community.plotly.com/t/plotly-dash-graphs/62969/1 "2022-04-12T09:16:19Z")

</div>

Hi,

My plotly graphs start at an axis (-1,1) even though the data starts at 0 and is always positive. Can someone help me in adjusting the axis to start from (0,0)

Here is my code:  
fig5 = px.bar(dff5,x=‘Stage’,y=‘Count’,template=“plotly\_dark”,color=‘Stage’,title=“Status of Release Requests Raised”,color\_discrete\_sequence=color\_discrete\_sequence)  
fig5.update\_xaxes(showticklabels=False, visible=False)

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

---

<div class="post-metadata">

### Author: ![jgomes\_eu](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/jgomes_eu/32/14895_2.png) [@jgomes\_eu](https://community.plotly.com/u/jgomes_eu)
#### Post date: [April 12, 2022, 9:43am UTC](https://community.plotly.com/t/plotly-dash-graphs/62969/2 "2022-04-12T09:43:23Z")

</div>

You can use  
`fig5.update_yaxes(range=[0, 1])`

to force the y-axis values to start from zero.

---

<div class="post-metadata">

### Author: ![shailu1391](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/shailu1391/32/18076_2.png) [@shailu1391](https://community.plotly.com/u/shailu1391)
#### Post date: [April 12, 2022, 1:12pm UTC](https://community.plotly.com/t/plotly-dash-graphs/62969/3 "2022-04-12T13:12:13Z")

</div>

Great that helps! But any idea how to keep the upper limit fluid than restricting at 1?

---

<div class="post-metadata">

### Author: ![jgomes\_eu](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/jgomes_eu/32/14895_2.png) [@jgomes\_eu](https://community.plotly.com/u/jgomes_eu)
#### Post date: [April 12, 2022, 1:15pm UTC](https://community.plotly.com/t/plotly-dash-graphs/62969/4 "2022-04-12T13:15:04Z")

</div>

Just calculate the max value for the y-axis and return that as your max range?

---

<div class="post-metadata">

### Author: ![shailu1391](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/shailu1391/32/18076_2.png) [@shailu1391](https://community.plotly.com/u/shailu1391)
#### Post date: [April 12, 2022, 1:15pm UTC](https://community.plotly.com/t/plotly-dash-graphs/62969/5 "2022-04-12T13:15:55Z")

</div>

okay will do

---

<div class="post-metadata">

### Author: ![jgomes\_eu](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/jgomes_eu/32/14895_2.png) [@jgomes\_eu](https://community.plotly.com/u/jgomes_eu)
#### Post date: [April 12, 2022, 1:19pm UTC](https://community.plotly.com/t/plotly-dash-graphs/62969/6 "2022-04-12T13:19:28Z")

</div>

If it sorts your problem, please mark my answer as the solution. Thanks!
