matplotlib Python seaborn轴指针刻度[重复]

2w3rbyxf  于 2023-03-30  发布在  Python
关注(0)|答案(1)|浏览(110)

此问题在此处已有答案

matplotlib ticks thickness(3个答案)
Make longer subplot tick marks in matplotlib?(1个答案)
How do I make my axis ticks bigger in matplotlib [duplicate](1个答案)
5天前关闭。
我用下面的代码在seaborn中创建了图中的箱线图。我想减少轴指针的厚度,就像我用红色圈出的例子一样,而不改变轴标签的大小。我如何提供这个?

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

aiqt4smr

aiqt4smr1#

检查this和这个。

  1. ax1.spines['bottom'].set_linewidth(0.5)
  2. ax1.spines['left'].set_linewidth(0.5)
  3. ax1.tick_params(width=0.5)

相关问题