tammoippen / plotille

Plot in the terminal using braille dots.
MIT License
398 stars 17 forks source link

[Feature request] support arrow #50

Closed feizheng10 closed 2 years ago

feizheng10 commented 2 years ago

Would you consider to support basic arrow as a start/end point of line just for convenience? Or can we draw " -----------> " easily?

tammoippen commented 2 years ago

This only works well with horizontal and vertical lines, right. Otherwise you need the pointy end at an angle.

When you only want horizontal arrows, you could write a text into the canvas:

fig.text([0.5], [0.5], ["----------->"])

for horizontal lines, you could write each character at a time, but then you need to consider the height of one character, ie set canvas height and max/min y values and you know the delta-y for a character. Then:

fig.text(xs, ys, ["^", "|", "|", "|", "|", "|", …])
feizheng10 commented 2 years ago

Thanks for your quick responds!! It is good enough for my usage for now.