sct-pipeline / gm-challenge

Spinal cord gray matter imaging challenge
MIT License
8 stars 3 forks source link

New version of `ptitprince` creates boxplots without alpha #76

Closed jcohenadad closed 2 years ago

jcohenadad commented 2 years ago

Possible fix: use seaborn:

#adding the boxplot with quartiles
f, ax = plt.subplots(figsize=(7, 5))
ax=pt.half_violinplot( x = dx, y = dy, data = df, palette = pal, bw = .2, cut = 0.,
                      scale = "area", width = .6, inner = None, orient = ort)
ax=sns.stripplot( x = dx, y = dy, data = df, palette = pal, edgecolor = "white",
                 size = 3, jitter = 1, zorder = 0, orient = ort)
ax=sns.boxplot( x = dx, y = dy, data = df, color = "black", width = .15, zorder = 10,\
            showcaps = True, boxprops = {'facecolor':'none', "zorder":10},\
            showfliers=True, whiskerprops = {'linewidth':2, "zorder":10},\
               saturation = 1, orient = ort)

plt.title("Figure P5\n Raincloud with Boxplot")
if savefigs:
    plt.savefig('../figs/tutorial_python/figureP05.png', bbox_inches='tight')

image

More details at: https://github.com/RainCloudPlots/RainCloudPlots