[英]Seaborn FacetGrid: make labels visible in each subplot
I have built a Seaborn plot with the below data我用以下数据构建了一个 Seaborn plot
I made the below code to show the FacetGrid我制作了下面的代码来显示 FacetGrid
def facetGridSales():
grouped_sales_data=pd.read_excel("Random Sales Data.xlsx",sheet_name="Sheet1")
g=sns.FacetGrid(data=grouped_sales_data,col='Location',col_wrap=4)
g.map(sns.barplot,'Item','Total Sale Amount',order=['Junk','Stuff','Widgets','Things'])
plt.savefig('CustomFacetGrid.jpg')
I have used col_wrap=4 to give 4 subplots in each line.我使用 col_wrap=4 在每行中给出 4 个子图。
My issue is that the labels ('Junk','Stuff','Widgets','Things) are not visible for the first row of subplots.我的问题是第一行子图的标签('Junk'、'Stuff'、'Widgets'、'Things)不可见。 Is there a way to increase the space between the rows of FacetGrid to make the first row labels visible?有没有办法增加 FacetGrid 行之间的空间以使第一行标签可见?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.