# Diff color for negative values in Bar Graph?

**URL:** <https://community.plotly.com/t/diff-color-for-negative-values-in-bar-graph/800>\
**Category:** 📊 Plotly Python\
**Created:** [April 5, 2016, 5:53pm UTC](https://community.plotly.com/t/diff-color-for-negative-values-in-bar-graph/800 "2016-04-05T17:53:03Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![rish\_s](https://avatars.discourse-cdn.com/v4/letter/r/a587f6/32.png) [@rish\_s](https://community.plotly.com/u/rish_s)\
**Post date:** [April 5, 2016, 5:53pm UTC](https://community.plotly.com/t/diff-color-for-negative-values-in-bar-graph/800/1 "2016-04-05T17:53:03Z")

</div>

I am trying to plot a bar graph from a pandas dataframe using cufflinks and plotly API for python and want a different color for negative values vs positive value in the same graph.

As of now, they are all the same color, is there a way to achieve this ?

---

<div class="post-metadata">

**Author:** ![muonstat](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/muonstat/32/205_2.png) [@muonstat](https://community.plotly.com/u/muonstat)\
**Post date:** [April 6, 2016, 10:04pm UTC](https://community.plotly.com/t/diff-color-for-negative-values-in-bar-graph/800/2 "2016-04-06T22:04:02Z")

</div>

Look at the last example of the matlab bar examples:

> **[Bar Charts](https://plotly.com/matlab/bar-charts/)**
>
> How to make a bar chart in MATLAB®. Seven examples of grouped, stacked, overlaid, and colored bar charts.
