Skip to content

Commit

Permalink
Merge pull request #44 from PierreGtch/patch-2
Browse files Browse the repository at this point in the history
Fix pointplot dodge parameter
  • Loading branch information
pog87 authored Oct 26, 2023
2 parents e293e87 + 4cc0d81 commit c3e737a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ptitprince/PtitPrince.py
Original file line number Diff line number Diff line change
Expand Up @@ -767,9 +767,10 @@ def RainCloud(x = None, y = None, hue = None, data = None,
if pointplot:
n_plots = 4
if not hue is None:
n_cat = len(np.unique(data[hue]))
sns.pointplot(x = x, y = y, hue = hue, data = data,
orient = orient, order = order, hue_order = hue_order,
dodge = width_box/2., palette = palette, ax = ax, **kwpoint)
dodge = width_box * (1 - 1 / n_cat), palette = palette, ax = ax, **kwpoint)
else:
sns.pointplot(x = x, y = y, hue = hue, data = data, color = linecolor,
orient = orient, order = order, hue_order = hue_order,
Expand Down

0 comments on commit c3e737a

Please sign in to comment.