Skip to content

Commit 6c99a1f

Browse files
committed
fixed no coordinate error
1 parent 2464758 commit 6c99a1f

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

bashplotlib/scatterplot.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,11 @@
1414

1515

1616
def get_scale(series, is_y=False, steps=20):
17-
min_val = min(series)
18-
max_val = max(series)
17+
min_val = -1 * (steps / 2)
18+
max_val = steps / 2
19+
if series != []:
20+
min_val = min(series)
21+
max_val = max(series)
1922
scaled_series = []
2023
for x in drange(min_val, max_val, (max_val - min_val) / steps,
2124
include_stop=True):

0 commit comments

Comments
 (0)