Skip to content

Commit 925a47b

Browse files
committed
fix the "bboxes cannot be empty" Error bug
1 parent cd63d98 commit 925a47b

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

dotplot/core.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,9 @@ def __init__(self, df_size: pd.DataFrame,
5252
self.col_colors = col_colors
5353
self.resized_size_data: Union[pd.DataFrame, None] = None
5454
self.resized_circle_data: Union[pd.DataFrame, None] = None
55+
if (self.row_colors is None) and (self.col_colors is None):
56+
self.col_colors = pd.DataFrame({'': ['#FFFFFF'] * df_size.shape[1]},
57+
index=df_size.columns.tolist())
5558

5659
def __get_figure(self):
5760
"""

0 commit comments

Comments
 (0)