Created
June 4, 2021 07:10
-
-
Save AayushSameerShah/5bae0f1b6ec086dcd9b7ce03218da3e7 to your computer and use it in GitHub Desktop.
The new kind of bar plot - diverging. There is no builtin - but create it on your own (SO SIMPLE)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For Vertical | |
plt.vlines(x= df.index, ymin= df.mean(), ymax= df.values, alpha=0.4, linewidth=5) | |
# For Horizontal | |
plt.hlines(y= df.index, xmin= df.mean(), xmax= df.values, alpha=0.4, linewidth=5) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
More here: https://www.geeksforgeeks.org/diverging-bar-chart-using-python/