Open
Description
I've come across this quite niche bug, I'll open a PR in a moment.
Describe the bug
Crossbars containing different points but intersecting rank intervals are merged in the same level (easier to see from figures).
To Reproduce:
import matplotlib.pyplot as plt
from pandas import DataFrame, Series
from scikit_posthocs import critical_difference_diagram
index = list("abcdef")
# Swap the ranks of 'c' and 'd'
ranks = Series([0, 1, 3, 2, 4, 5], index=index)
sig_matrix = DataFrame(
[
[1, 1, 1, 0, 0, 0],
[1, 1, 1, 0, 0, 0],
[1, 1, 1, 0, 0, 0],
[0, 0, 0, 1, 1, 1],
[0, 0, 0, 1, 1, 1],
[0, 0, 0, 1, 1, 1],
],
index=index,
columns=index,
)
output = critical_difference_diagram(
ranks, sig_matrix, crossbar_props={"marker": "s"}
)
plt.title("Non-intersecting crossbars")
System and package information:
- OS: Windows 11, x86_64
- Package version: (0.11.4)