MCPcopy
hub / github.com/glamp/bashplotlib / get_scale

Function get_scale

bashplotlib/scatterplot.py:16–28  ·  view source on GitHub ↗
(series, is_y=False, steps=20)

Source from the content-addressed store, hash-verified

14
15
16def get_scale(series, is_y=False, steps=20):
17 min_val = min(series)
18 max_val = max(series)
19 scaled_series = []
20 for x in drange(min_val, max_val, (max_val - min_val) / steps,
21 include_stop=True):
22 if x > 0 and scaled_series and max(scaled_series) < 0:
23 scaled_series.append(0.0)
24 scaled_series.append(x)
25
26 if is_y:
27 scaled_series.reverse()
28 return scaled_series
29
30
31def _plot_scatter(xs, ys, size, pch, colour, title, cs):

Callers 1

_plot_scatterFunction · 0.85

Calls 1

drangeFunction · 0.85

Tested by

no test coverage detected