Search snippets
Browse Code Answers
FAQ
Usage docs
Log In
Sign Up
Home
Python
sns how to change color if negative or positive
PSmita
Programming language:
Python
2021-06-21 00:53:21
0
Q:
sns how to change color if negative or positive
user24986
Code:
Python
2021-06-07 23:00:55
data['values'].plot(kind='barh', color=(data['values'] > 0).map({True: 'g', False: 'r'}))
0
Tags
change
color
how
Related
convert negative to positive in python
how to make a program that identifies positives and negatives in python
How to count a consecutive series of positive or negative values in a column in python
New to Communities?
Join the community