From 16e3d68e554f95b978655c86162bd7d4731a0cf3 Mon Sep 17 00:00:00 2001 From: Joel Nothman Date: Thu, 28 Dec 2023 10:55:44 +1100 Subject: [PATCH] Set column types explicitly --- upsetplot/plotting.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/upsetplot/plotting.py b/upsetplot/plotting.py index 875ef8b..d258cb6 100644 --- a/upsetplot/plotting.py +++ b/upsetplot/plotting.py @@ -656,7 +656,9 @@ def plot_matrix(self, ax): "linewidth": "linewidths", "linestyle": "linestyles", "hatch": "hatch"} - styles = pd.DataFrame(styles).reindex(columns=style_columns.keys()) + styles = (pd.DataFrame(styles) + .reindex(columns=style_columns.keys()) + .astype(['o', 'o', int, 'o', 'o'])) styles["linewidth"].fillna(1, inplace=True) styles["facecolor"].fillna(self._facecolor, inplace=True) styles["edgecolor"].fillna(styles["facecolor"], inplace=True)