Skip to content

Commit

Permalink
fix: Allow x/y min/max to be None (e.g. bars, columns)
Browse files Browse the repository at this point in the history
  • Loading branch information
jpmckinney committed Oct 4, 2023
1 parent b17ae85 commit 60d03eb
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions agatecharts/tableset.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,10 @@ def plot(tableset, chart, filename=None, size=None, dpi=DEFAULT_DPI):
table_x_min, table_x_max = chart.get_x_domain(table)
table_y_min, table_y_max = chart.get_y_domain(table)

x_min = min(x_min, table_x_min)
x_max = max(x_max, table_x_max)
y_min = min(y_min, table_y_min)
y_max = max(y_max, table_y_max)
x_min = min(filter(None, [x_min, table_x_min]))
x_max = max(filter(None, [x_max, table_x_max]))
y_min = min(filter(None, [y_min, table_y_min]))
y_max = max(filter(None, [y_max, table_y_max]))

x_min, x_max, y_min, y_max = round_limits(x_min, x_max, y_min, y_max)

Expand Down

0 comments on commit 60d03eb

Please sign in to comment.