-1

I created the boxplot in the picture in seaborn with the code below. I want to reduce the axis pointer thicknesses as in the example I circled in red without changing the axis label size. How do I provide this?

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)

enter image description here

JohanC
  • 71,591
  • 8
  • 33
  • 66
  • What you call a "pointer", matplotlib calls a "tick mark". You can change the thickness (line width) via `for ax in axes: ax.tick_params(width=0.3)`. The default line width is `0.8`. – JohanC Mar 24 '23 at 08:50

1 Answers1

1

Check this and this.

ax1.spines['bottom'].set_linewidth(0.5)
ax1.spines['left'].set_linewidth(0.5)
ax1.tick_params(width=0.5)
angwrk
  • 394
  • 1
  • 8
  • 1
    From the link you provide, it shows that changing the attributes of `spines` won't adjust the thickness of the tick marks as the OP wants, but will instead adjust the thickness of the [axis boundary lines](https://matplotlib.org/stable/api/spines_api.html). – Matt Pitkin Mar 24 '23 at 09:14