Skip to content

Commit 5289563

Browse files
committed
[PPAB] Draw rectangle corners using "+" signs
1 parent cded03a commit 5289563

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

bashplotlib/scatterplot.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def _plot_scatter(xs, ys, size, pch, colour, title, cs):
3434
if title:
3535
print(box_text(title, 2 * (len(get_scale(xs, False, size)) + 1)))
3636

37-
print("-" * (2 * (len(get_scale(xs, False, size)) + 2)))
37+
print("+" + "-" * (2 * (len(get_scale(xs, False, size)) + 1)) + "+")
3838
for y in get_scale(ys, True, size):
3939
print("|", end=' ')
4040
for x in get_scale(xs, False, size):
@@ -47,7 +47,7 @@ def _plot_scatter(xs, ys, size, pch, colour, title, cs):
4747
colour = cs[i]
4848
printcolour(point + " ", True, colour)
4949
print(" |")
50-
print("-" * (2 * (len(get_scale(xs, False, size)) + 2)))
50+
print("+" + "-" * (2 * (len(get_scale(xs, False, size)) + 1)) + "+")
5151

5252
def plot_scatter(f, xs, ys, size, pch, colour, title):
5353
"""

bashplotlib/utils/helpers.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ def box_text(text, width, offset=0):
8080
"""
8181
Return text inside an ascii textbox
8282
"""
83-
box = " " * offset + "-" * (width+2) + "\n"
83+
box = " " * offset + "+" + "-" * width + "+" + "\n"
8484
box += " " * offset + "|" + text.center(width) + "|" + "\n"
85-
box += " " * offset + "-" * (width+2)
85+
box += " " * offset + "+" + "-" * width + "+"
8686
return box

0 commit comments

Comments
 (0)