Skip to content

Commit

Permalink
Add wrong y_labels error.
Browse files Browse the repository at this point in the history
  • Loading branch information
emunozdc committed Jun 14, 2024
1 parent 8b7ac60 commit b0bdb56
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/pyranges_plot/plot_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,13 @@ def plot(
if not isinstance(data, list):
data = [data]

# Ensure correct y_labels
if y_labels:
if len(y_labels) != len(data):
raise Exception(
f"The number of provided y_labels {y_labels} does not match the number of PyRanges objects ({len(data)})."
)

# Deal with export
if to_file:
# given str file name
Expand Down

0 comments on commit b0bdb56

Please sign in to comment.