tammoippen / plotille

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

Draw vertical or horizontal lines on plots #27

Closed acarl005 closed 3 years ago

acarl005 commented 4 years ago

Drawing arbitrary vertical or horizontal lines on plot (scatter plots or histograms) is generally very useful, something analogous to this in matplotlib.

tammoippen commented 4 years ago

Hello @acarl005, thanks for the suggestion. I think they can easily be implemented in Figure by adding a methods, that use the plot function with two coordinates in X and Y, respectively. Are you interested in providing a PR? Otherwise I will look into this, but it might take some weeks for me to find the time.

acarl005 commented 4 years ago

For the API, what did you have in mind? If I wanted to create a vertical line at x = 5, maybe something like fig.plot(X=5) where Y argument is omitted?

tammoippen commented 4 years ago

I think, i would prefer a new function for each, vlines(x) and hlines(y), as close as possible to https://matplotlib.org/3.1.0/api/_as_gen/matplotlib.axes.Axes.vlines.html#matplotlib.axes.Axes.vlines

tammoippen commented 3 years ago

Implemented in #38. Closing