Is there a way to change the linestyle of the whiskers in pandas boxplots to '-'? Default seems to be '--'.
I have tried:
color = dict(boxes='black', whiskers='black', medians='red', caps='black')
styles=dict(whiskers='-')
bp = df.plot.box(color=color, style=styles)
However, while the colors turn out the way I want, the style input does not seem to affect the plot at all.
Here is an example. I always get dashed lines for my whiskers, but would like solid lines.
I have also tried
boxprops = dict(linewidth=1.0, color='black')
whiskerprops = dict(linestyle='-',linewidth=1.0, color='black')
plt.figure()
df.boxplot(boxprops=boxprops, whiskerprops=whiskerprops)
Here, df.boxplot does not take the inputs at all.
This is closely related to Pandas boxplot: set color and properties for box, median, mean
linestyle ='--'
– Emeryby
parameter is not doing anything, which might be a bug in itself. – Emeryimport seaborn as sns tips = sns.load_dataset('tips') tips.boxplot('tip', whiskerprops = dict(linestyle='-',linewidth=4.0, color='black'))
– Emery