Add sample codes to README

This commit is contained in:
kojix2 2020-10-12 14:24:02 +09:00 committed by GitHub
parent 6ebc707c51
commit 428d525c5f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -26,25 +26,53 @@ ruby -r numo/narray -e "puts Numo::DFloat.new(1000).rand_norm.to_a" \
| uplot hist --nbins 15 | uplot hist --nbins 15
``` ```
<img src="https://i.imgur.com/wpsoGJq.png" width="75%" height="75%"></img> <img src="https://i.imgur.com/wpsoGJq.png" width="75%" height="75%">
<img src="https://i.imgur.com/97R2MQx.png" width="75%" height="75%"></img> ```sh
echo "from numpy import random;" \
"n = random.randn(10000);" \
"print('\n'.join(str(i) for i in n))" \
| python \
| uplot hist --nbins 20
```
<img src="https://i.imgur.com/97R2MQx.png" width="75%" height="75%">
**scatter** **scatter**
<img src="https://i.imgur.com/STX7bFT.png" width="75%" height="75%"></img> ```sh
curl -s https://raw.githubusercontent.com/uiuc-cse/data-fa14/gh-pages/data/iris.csv \
| cut -f1-4 -d, \
| uplot scatter -H -d, -t IRIS
```
<img src="https://i.imgur.com/STX7bFT.png" width="75%" height="75%">
**line** **line**
<img src="https://i.imgur.com/PVl5dsa.png" width="75%" height="75%"></img> ```sh
curl -s https://www.mhlw.go.jp/content/pcr_positive_daily.csv \
| cut -f2 -d, \
| uplot line -w 50 -h 15 -t 'PCR positive tests' --xlabel Date --ylabel number
```
<img src="https://i.imgur.com/PVl5dsa.png" width="75%" height="75%">
**box** **box**
<img src="https://i.imgur.com/sNI4SmN.png" width="75%" height="75%"></img> ```sh
curl -s https://raw.githubusercontent.com/uiuc-cse/data-fa14/gh-pages/data/iris.csv \
| cut -f1-4 -d, \
| uplot box -H -d, -t IRIS
```
<img src="https://i.imgur.com/sNI4SmN.png" width="75%" height="75%">
## Development ## Development
Let's keep it simple.
## Contributing ## Contributing
Bug reports and pull requests are welcome on GitHub at [https://github.com/kojix2/uplot](https://github.com/kojix2/uplot). Bug reports and pull requests are welcome on GitHub at [https://github.com/kojix2/uplot](https://github.com/kojix2/uplot).