# Matplotlib bar chart wont plot negative numbers

**URL:** <https://community.plotly.com/t/matplotlib-bar-chart-wont-plot-negative-numbers/2137>\
**Category:** 📊 Plotly Python\
**Created:** [September 18, 2016, 8:30pm UTC](https://community.plotly.com/t/matplotlib-bar-chart-wont-plot-negative-numbers/2137 "2016-09-18T20:30:23Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![enolette](https://avatars.discourse-cdn.com/v4/letter/e/8e8cbc/32.png) [@enolette](https://community.plotly.com/u/enolette)\
**Post date:** [September 18, 2016, 8:30pm UTC](https://community.plotly.com/t/matplotlib-bar-chart-wont-plot-negative-numbers/2137/1 "2016-09-18T20:30:23Z")

</div>

I am struggling to understand why the matplotlib converter will not plot negative values. I have a dataframe I with negative numbers, which plots fine under normal matplotlib circumstances, but when converting to a plotly chart it strips the negative.

Using this code:  
fig = plt.gcf()  
plotly\_fig = tls.mpl\_to\_plotly( fig )  
py.iplot(plotly\_fig)

---

<div class="post-metadata">

**Author:** ![windflower715](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/windflower715/32/3697_2.png) [@windflower715](https://community.plotly.com/u/windflower715)\
**Post date:** [July 27, 2018, 4:03pm UTC](https://community.plotly.com/t/matplotlib-bar-chart-wont-plot-negative-numbers/2137/2 "2018-07-27T16:03:22Z")

</div>

I have the same problem, any idea how to solve it ?

---

<div class="post-metadata">

**Author:** ![jmmease](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/jmmease/32/3706_2.png) [@jmmease](https://community.plotly.com/u/jmmease)\
**Post date:** [July 27, 2018, 10:24pm UTC](https://community.plotly.com/t/matplotlib-bar-chart-wont-plot-negative-numbers/2137/3 "2018-07-27T22:24:47Z")

</div>

Hi @windflower715,

If you can make a small reproducible example (including the matplotlib code to build the figure) this would be a helpful bug report: [https://github.com/plotly/plotly.py/issues](https://github.com/plotly/plotly.py/issues).

Thanks!  
-Jon
