Python seaborn 轴指针刻度

问题描述 投票:0回答:1

我使用下面的代码在 seaborn 中创建了图片中的箱线图。我想在不更改轴标签大小的情况下减小轴指针粗细,如我用红色圈出的示例所示。我如何提供这个?

import matplotlib.pyplot as plt
import seaborn as sns
    fig, axes = plt.subplots(1, 5)
    ax1=sns.boxplot(x='YONTEM', y='Özgüllük', orient='v', ax=axes[0],data=df1, showfliers=False, linewidth=0.5)
    ax2= sns.boxplot(x='YONTEM', y='Özgüllük', orient='v', ax=axes[1],data=df2, showfliers=False, linewidth=0.5)
    ax3=sns.boxplot(x='YONTEM', y='Özgüllük', orient='v', ax=axes[2],data=df3, showfliers=False, linewidth=0.5)

python graph seaborn boxplot axis
1个回答
0
投票

检查this.

ax1.spines['bottom'].set_linewidth(0.5)
ax1.spines['left'].set_linewidth(0.5)
© www.soinside.com 2019 - 2024. All rights reserved.