chrplotlib-0.0.3
توضیحات
Char plot in Python
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | chrplotlib-0.0.3 |
| نام | chrplotlib |
| نسخه کتابخانه | 0.0.3 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Guo Fei |
| ایمیل نویسنده | guofei9987@foxmail.com |
| آدرس صفحه اصلی | https://github.com/guofei9987/chrplotlib |
| آدرس اینترنتی | https://pypi.org/project/chrplotlib/ |
| مجوز | MIT |
# chrplotlib
Plot graphs using chars
install:
```bash
$pip install chrplotlib
```
For the current developer version:
```bash
git clone git@github.com:guofei9987/chrplotlib.git
cd chrplotlib
pip install .
```
## example
```python
from chrplotlib import animation
def update_bar(i):
data = 10 * np.random.rand(20)
print(bar(data, label=range(20), max_height=10))
print('\033[{}A'.format(12))
animation(update_func=update_bar, interval=range(100), pause=0.2)
```

```python
data = 10 * np.random.rand(20)
label = range(20)
```
```python
print(bar(data))
```
Print this:
```
▃▃
▃▃ ▃▃ ██ ▅▅
██ ▇▇ ██ ██ ▇▇ ██
██ ██ ██ ██ ██ ██
██ ██ ▇▇ ▃▃ ██ ██ ██ ██
██ ██ ▄▄ ▅▅ ██ ██ ██ ██ ██ ██ ▃▃
██ ██ ██ ██ ▂▂ ██ ██ ██ ██ ▃▃ ██ ██ ██
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██
██ ██ ██ ██ ██ ██ ██ ██ ▄▄ ██ ██ ██ ██ ▂▂ ██ ▇▇ ██
██ ██ ██ ██ ▃▃ ██ ██ ██ ██ ██ ██ ██ ██ ▃▃ ██ ██ ██ ██ ██ ██
```
```python
print(bar(data=data, label=range(20)))
```
Print this:
```
▃▃
▃▃ ▃▃ ██ ▅▅
██ ▇▇ ██ ██ ▇▇ ██
██ ██ ██ ██ ██ ██
██ ██ ▇▇ ▃▃ ██ ██ ██ ██
██ ██ ▄▄ ▅▅ ██ ██ ██ ██ ██ ██ ▃▃
██ ██ ██ ██ ▂▂ ██ ██ ██ ██ ▃▃ ██ ██ ██
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██
██ ██ ██ ██ ██ ██ ██ ██ ▄▄ ██ ██ ██ ██ ▂▂ ██ ▇▇ ██
██ ██ ██ ██ ▃▃ ██ ██ ██ ██ ██ ██ ██ ██ ▃▃ ██ ██ ██ ██ ██ ██
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
```
```python
print(bar(data, kind='bar'))
```
Get this:
```
█▌█▌█▌█▌█▌█▌█▌█▌▌
█▌█▌█▌█▌█▌█▌█▌█▌
█▌█▌█▌█▌▋
█▌█▌█▌█▌█
▌
█▌█▌█▌▎
█▌█▌█▌█▌█▌█▌
█▌█▌█▌█▌█▌▌
█▌█▌█▌█▌█▌█▌█▌█▌▍
█▌▋
█▌█▌
█▌█▌█▌█▌█▌█▌█▌█▌█▌▌
█▌█▌█▌▍
▌
█▌█▌█▌█▌█▌█▌█▌█▌
█▌
█▌▎
█▌█▌█▌█▌█▌█▌█▌█▌█▎
█▌█▌
█▌█▌█▌█▌▌
```
```python
print(bar(data=data, label=range(20), kind='barh'))
```
Get this:
```
0 █▌█▌█▌█▌█▌█▌█▌█▌▌
1 █▌█▌█▌█▌█▌█▌█▌█▌
2 █▌█▌█▌█▌▋
3 █▌█▌█▌█▌█
4 ▌
5 █▌█▌█▌▎
6 █▌█▌█▌█▌█▌█▌
7 █▌█▌█▌█▌█▌▌
8 █▌█▌█▌█▌█▌█▌█▌█▌▍
9 █▌▋
10█▌█▌
11█▌█▌█▌█▌█▌█▌█▌█▌█▌▌
12█▌█▌█▌▍
13▌
14█▌█▌█▌█▌█▌█▌█▌█▌
15█▌
16█▌▎
17█▌█▌█▌█▌█▌█▌█▌█▌█▎
18█▌█▌
19█▌█▌█▌█▌▌
```
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.5 | Python |
نحوه نصب
نصب پکیج whl chrplotlib-0.0.3:
pip install chrplotlib-0.0.3.whl
نصب پکیج tar.gz chrplotlib-0.0.3:
pip install chrplotlib-0.0.3.tar.gz