Search
 
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
Name
2+3 =