【发布时间】:2017-11-15 21:09:08
【问题描述】:
让它看起来像这样:
通过反转 Y 轴并将“Horizontal Axis Crosses”设置为“max”。
我想在 Seaborn 中做同样的事情。我可以使用.invert_yaxis() 翻转 y_axis,但我无法像在 Excel 中那样保持图表底部的条形。
import seaborn as sns
barplot = sns.barplot(x='abc'
,y='def'
,data=df
,ci=None
)
barplot.invert_yaxis()
barplot.figure
如何将条形从顶部移动到底部?
我正在使用 Python 3.6 和 seaborn 0.7.1
我的问题似乎与这个类似,但这个问题不清楚并且没有答案: Pyplot - Invert Y labels without inverting bar chart
【问题讨论】:
标签: python python-3.x matplotlib seaborn