(xs, ys, size, pch, colour, title, cs)
| 29 | |
| 30 | |
| 31 | def _plot_scatter(xs, ys, size, pch, colour, title, cs): |
| 32 | plotted = set() |
| 33 | |
| 34 | if title: |
| 35 | print(box_text(title, 2 * len(get_scale(xs, False, size)) + 1)) |
| 36 | |
| 37 | print("-" * (2 * len(get_scale(xs, False, size)) + 2)) |
| 38 | for y in get_scale(ys, True, size): |
| 39 | print("|", end=' ') |
| 40 | for x in get_scale(xs, False, size): |
| 41 | point = " " |
| 42 | for (i, (xp, yp)) in enumerate(zip(xs, ys)): |
| 43 | if xp <= x and yp >= y and (xp, yp) not in plotted: |
| 44 | point = pch |
| 45 | plotted.add((xp, yp)) |
| 46 | if cs: |
| 47 | colour = cs[i] |
| 48 | printcolour(point, True, colour) |
| 49 | print(" |") |
| 50 | print("-" * (2 * len(get_scale(xs, False, size)) + 2)) |
| 51 | |
| 52 | def plot_scatter(f, xs, ys, size, pch, colour, title): |
| 53 | """ |
no test coverage detected