Skip to content

Commit

Permalink
Set column types explicitly
Browse files Browse the repository at this point in the history
  • Loading branch information
jnothman committed Dec 27, 2023
1 parent 5e970e8 commit 16e3d68
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion upsetplot/plotting.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 16e3d68

Please sign in to comment.