DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
SCRIPT & CODE EXAMPLE
CODE EXAMPLE FOR PYTHON
sns how to change color if negative or positive
data['values'].plot(kind='barh', color=(data['values'] > 0).map({True: 'g', False: 'r'}))
Source by stackoverflow.com #
PREVIOUS
NEXT
Tagged:
#sns
#change
#color
#negative
#positive
ADD COMMENT
Topic
COMMENT
Name
2+3 =
Submit