删除 matplotlib boxplot 传单的边宽
Remove edgewidth of matplotlib boxplot flier
在下面的箱线图中,我想移除传单的黑色边缘(粉色圆圈)。但是,它似乎不起作用。这是我的代码:
bp = plt.boxplot(boxes)
for flier in bp['fliers']:
flier.set(marker = 'o', color = '#e7298a', alpha = 0.5, linewidth = 0.0)
您是否尝试过在生成绘图时设置样式?
flierprops = dict(marker='o', markerfacecolor='green', markersize=12, linestyle='none')
或(均未测试)
flierprops = dict(marker='o', fillstyle='full', markeredecolor='red', markeredgewidth=0.0)
然后
boxplot(data, flierprops=flierprops)
示例来自:http://matplotlib.org/examples/statistics/boxplot_demo.html
在下面的箱线图中,我想移除传单的黑色边缘(粉色圆圈)。但是,它似乎不起作用。这是我的代码:
bp = plt.boxplot(boxes)
for flier in bp['fliers']:
flier.set(marker = 'o', color = '#e7298a', alpha = 0.5, linewidth = 0.0)
您是否尝试过在生成绘图时设置样式?
flierprops = dict(marker='o', markerfacecolor='green', markersize=12, linestyle='none')
或(均未测试)
flierprops = dict(marker='o', fillstyle='full', markeredecolor='red', markeredgewidth=0.0)
然后
boxplot(data, flierprops=flierprops)
示例来自:http://matplotlib.org/examples/statistics/boxplot_demo.html