mirror of
https://github.com/red-data-tools/YouPlot.git
synced 2025-05-07 07:31:12 +08:00
Update README.md
Added examples for offline use
This commit is contained in:
parent
60f9cb32dd
commit
f3623bd504
38
README.md
38
README.md
@ -45,6 +45,11 @@ curl -sL https://git.io/ISLANDScsv \
|
|||||||
<img alt="barplot" src="https://user-images.githubusercontent.com/5798442/101999903-d36a2d00-3d24-11eb-9361-b89116f44122.png">
|
<img alt="barplot" src="https://user-images.githubusercontent.com/5798442/101999903-d36a2d00-3d24-11eb-9361-b89116f44122.png">
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
```sh
|
||||||
|
# For offline users
|
||||||
|
ls -l | awk '{print $9, $5}' | sort -nk 2 | uplot bar -d ' '
|
||||||
|
```
|
||||||
|
|
||||||
### histogram
|
### histogram
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
@ -71,6 +76,14 @@ curl -sL https://git.io/AirPassengers \
|
|||||||
<img alt="lineplot" src="https://user-images.githubusercontent.com/5798442/101999825-24c5ec80-3d24-11eb-99f4-c642e8d221bc.png">
|
<img alt="lineplot" src="https://user-images.githubusercontent.com/5798442/101999825-24c5ec80-3d24-11eb-99f4-c642e8d221bc.png">
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
```sh
|
||||||
|
# For offline users
|
||||||
|
python -c '
|
||||||
|
from math import sin, pi
|
||||||
|
data = "\n".join(f"{i*pi/50}\t{sin(i*pi/50)}" for i in range(101))
|
||||||
|
print(data)' | uplot line
|
||||||
|
```
|
||||||
|
|
||||||
### scatter
|
### scatter
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
@ -83,6 +96,12 @@ curl -sL https://git.io/IRIStsv \
|
|||||||
<img alt="scatter" src="https://user-images.githubusercontent.com/5798442/101999827-27284680-3d24-11eb-9903-551857eaa69c.png">
|
<img alt="scatter" src="https://user-images.githubusercontent.com/5798442/101999827-27284680-3d24-11eb-9903-551857eaa69c.png">
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
||||||
|
```sh
|
||||||
|
# For offline users
|
||||||
|
cat test/fixtures/iris.csv | cut -f1-4 -d, | uplot scatter -H -d, -t IRIS
|
||||||
|
```
|
||||||
|
|
||||||
### density
|
### density
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
@ -95,6 +114,11 @@ curl -sL https://git.io/IRIStsv \
|
|||||||
<img alt="density" src="https://user-images.githubusercontent.com/5798442/101999828-2abbcd80-3d24-11eb-902c-2f44266fa6ae.png">
|
<img alt="density" src="https://user-images.githubusercontent.com/5798442/101999828-2abbcd80-3d24-11eb-902c-2f44266fa6ae.png">
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
```sh
|
||||||
|
# For offline users
|
||||||
|
cat test/fixtures/iris.csv | cut -f1-4 -d, | uplot density -H -d, -t IRIS
|
||||||
|
```
|
||||||
|
|
||||||
### boxplot
|
### boxplot
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
@ -107,8 +131,21 @@ curl -sL https://git.io/IRIStsv \
|
|||||||
<img alt="boxplot" src="https://user-images.githubusercontent.com/5798442/101999830-2e4f5480-3d24-11eb-8891-728c18bf5b35.png">
|
<img alt="boxplot" src="https://user-images.githubusercontent.com/5798442/101999830-2e4f5480-3d24-11eb-8891-728c18bf5b35.png">
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
```sh
|
||||||
|
# For offline users
|
||||||
|
cat test/fixtures/iris.csv | cut -f1-4 -d, | uplot boxplot -H -d, -t IRIS
|
||||||
|
```
|
||||||
|
|
||||||
### count
|
### count
|
||||||
|
|
||||||
|
Count processes by user ID.
|
||||||
|
|
||||||
|
```sh
|
||||||
|
ps -aux | awk '{print $1}' | uplot count
|
||||||
|
```
|
||||||
|
|
||||||
|
YouPlot counts the number of chromosomes where genes are located.
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
cat gencode.v35.annotation.gff3 \
|
cat gencode.v35.annotation.gff3 \
|
||||||
| grep -v '#' | grep 'gene' | cut -f1 \
|
| grep -v '#' | grep 'gene' | cut -f1 \
|
||||||
@ -119,7 +156,6 @@ cat gencode.v35.annotation.gff3 \
|
|||||||
<img alt="count" src="https://user-images.githubusercontent.com/5798442/101999832-30b1ae80-3d24-11eb-96fe-e5000bed1f5c.png">
|
<img alt="count" src="https://user-images.githubusercontent.com/5798442/101999832-30b1ae80-3d24-11eb-96fe-e5000bed1f5c.png">
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
In this example, YouPlot counts the number of chromosomes where genes are located.
|
|
||||||
* [GENCODE - Human Release](https://www.gencodegenes.org/human/)
|
* [GENCODE - Human Release](https://www.gencodegenes.org/human/)
|
||||||
|
|
||||||
Note: `count` is not very fast because it runs in a Ruby script.
|
Note: `count` is not very fast because it runs in a Ruby script.
|
||||||
|
Loading…
Reference in New Issue
Block a user