Skip to content
Advertisement

Right align horizontal seaborn barplot

How can I make the horizontal seaborn barplot right aligned / mirrored

JavaScript

The default horizontal barplot looks like this
enter image description here

I want to have something like this (with proper xticks)
enter image description here

Advertisement

Answer

In order to invert the x axis, you can use:

JavaScript

Then, in order to move the labels to the right, you can use:

JavaScript

or, shorter:

JavaScript

Complete Code

JavaScript

enter image description here

User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement