piccolomo / plotext

plotting on terminal
MIT License
1.77k stars 82 forks source link

Feature Request: boxplot #169

Open feizheng10 opened 1 year ago

feizheng10 commented 1 year ago

boxplot is really common and useful in statistics plot, for instance, https://matplotlib.org/3.1.1/gallery/pyplots/boxplot_demo_pyplot.html#sphx-glr-gallery-pyplots-boxplot-demo-pyplot-py As hist/candlestick have been supported in plotext...Is it convenient to have boxplot as well? Thanks!!

is commented 1 year ago

@feizheng10 Can you try my code branch? https://github.com/is/plotext/tree/box If everything works fine, I'll clean up the code and submit a formal PR.

import plotext as plt

# pizzas = ["Sausage", "Pepperoni", "Mushrooms", "Cheese", "Chicken", "Beef"]
# percentages = [14, 36, 11, 8, 7, 4]

labels = ["apple", "bee", "cat", "dog"]
datas = [
    [1,2,3,5,10,8],
    [4,9,6,12,20,13],
    [1,2,3,4,5,6],
    [3,9,12,16,9,8,3,7,2]]

plt.box(labels, datas, width=0.3)
plt.title("Most Favored Pizzas in the World")
plt.show()
piccolomo commented 1 year ago

Hi @is and @feizheng10,

I will come back to this. I am not into plotext lately, but I will eventually. Any code idea is welcomed. @is seems you already built it in a different branch?

Thanks and all the best

is commented 1 year ago

@piccolomo Yeah, I create a PR #170 , You can review it.

piccolomo commented 1 year ago

Thanks I hopefully will do it soon.

feizheng10 commented 1 year ago

@piccolomo, since https://github.com/piccolomo/plotext/pull/170 have been addressed the request and merged into master, I will close this PR. Please add credit for @is. And may I know when the new tag 3.5.1 will be available with pip? Thanks!

piccolomo commented 1 month ago

Just to update and apologise: I have been quite busy rewriting the package from ground up and will update.