Skip to content

Commit 1270897

Browse files
committed
fixed color_palette use in critical difference plot (closes #85)
1 parent 0347b7c commit 1270897

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

scikit_posthocs/_plotting.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ def sign_plot(
116116
flat: bool = False,
117117
labels: bool = True,
118118
cmap: Optional[List] = None,
119-
cbar_ax_bbox: Optional[List] = None,
119+
cbar_ax_bbox: Optional[Tuple[float, float, float, float]] = None,
120120
ax: Optional[Axes] = None,
121121
**kwargs,
122122
) -> Union[Axes, Tuple[Axes, Colorbar]]:
@@ -244,7 +244,7 @@ def sign_plot(
244244
hax.set_xlabel("")
245245
hax.set_ylabel("")
246246

247-
cbar_ax = hax.figure.add_axes(cbar_ax_bbox or [0.95, 0.35, 0.04, 0.3])
247+
cbar_ax = hax.figure.add_axes(cbar_ax_bbox or (0.95, 0.35, 0.04, 0.3))
248248
cbar = ColorbarBase(
249249
cbar_ax,
250250
cmap=(ListedColormap(cmap[2:] + [cmap[1]])),
@@ -603,7 +603,7 @@ def plot_items(points, xpos, label_fmt, color_palette, label_props):
603603
points_right[::-1],
604604
xpos=points_right.iloc[-1] + text_h_margin,
605605
label_fmt=label_fmt_right,
606-
color_palette=color_palette,
606+
color_palette=list(reversed(color_palette)),
607607
label_props={"ha": "left", **label_props},
608608
)
609609

0 commit comments

Comments
 (0)