youplot 0.4.5 → 0.4.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +60 -4
- data/lib/youplot/parser.rb +1 -1
- data/lib/youplot/version.rb +1 -1
- metadata +21 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d73be033d215d1df04dfef6be988a55e669699a4a8e6c408ac38bb4ff0c680a6
|
4
|
+
data.tar.gz: 5f84877f99e1d5f52290caf33ed16e2ae67ff2465ac9acf50ae33630131f225e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2a593cd01599a76949ea17ca00f5b24b6a6f92c971b68281775c8a0ddb7d25d9c6269c64ee2a79ea482abadeb9c44f2b5d91cfe0298b81a6da3139405d8bf1c8
|
7
|
+
data.tar.gz: 4912f82e6e82c9533b13f8d16b0120a7e40adb8bc55d4026d7dc08bbc2efb4c186e9b7653b58baa7990661ffd299331e6a937032cee0c3623f6f0b2eaf420fc2
|
data/README.md
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
<div align="center">
|
2
2
|
<img src="logo.svg">
|
3
3
|
<hr>
|
4
|
-
<img alt="Build Status" src="https://github.com/red-data-tools/YouPlot/workflows/test/badge.svg">
|
4
|
+
<a href="https://github.com/red-data-tools/YouPlot/actions/workflows/ci.yml"><img alt="Build Status" src="https://github.com/red-data-tools/YouPlot/workflows/test/badge.svg"></a>
|
5
5
|
<a href="https://rubygems.org/gems/youplot/"><img alt="Gem Version" src="https://badge.fury.io/rb/youplot.svg"></a>
|
6
6
|
<a href="https://zenodo.org/badge/latestdoi/283230219"><img alt="DOI" src="https://zenodo.org/badge/283230219.svg"></a>
|
7
7
|
<a href="https://rubydoc.info/gems/youplot/"><img alt="Docs Stable" src="https://img.shields.io/badge/docs-stable-blue.svg"></a>
|
@@ -15,6 +15,24 @@
|
|
15
15
|
## Installation
|
16
16
|
|
17
17
|
```
|
18
|
+
brew install youplot
|
19
|
+
```
|
20
|
+
|
21
|
+
```
|
22
|
+
gem install youplot
|
23
|
+
```
|
24
|
+
|
25
|
+
```
|
26
|
+
nix shell nixpkgs#youplot
|
27
|
+
```
|
28
|
+
|
29
|
+
```
|
30
|
+
guix install youplot
|
31
|
+
```
|
32
|
+
|
33
|
+
```
|
34
|
+
conda install -c conda-forge ruby
|
35
|
+
conda install -c conda-forge compilers
|
18
36
|
gem install youplot
|
19
37
|
```
|
20
38
|
|
@@ -37,13 +55,20 @@ curl -sL https://git.io/ISLANDScsv \
|
|
37
55
|
<img alt="barplot" src="https://user-images.githubusercontent.com/5798442/101999903-d36a2d00-3d24-11eb-9361-b89116f44122.png">
|
38
56
|
</p>
|
39
57
|
|
58
|
+
|
59
|
+
|
60
|
+
```sh
|
61
|
+
# For offline user: Sorts files in a directory by size and shows a bar graph.
|
62
|
+
ls -l | awk '{print $9, $5}' | sort -nk 2 | uplot bar -d ' '
|
63
|
+
```
|
64
|
+
|
40
65
|
### histogram
|
41
66
|
|
42
67
|
```sh
|
43
68
|
echo -e "from numpy import random;" \
|
44
69
|
"n = random.randn(10000);" \
|
45
70
|
"print('\\\n'.join(str(i) for i in n))" \
|
46
|
-
|
|
71
|
+
| python3 \
|
47
72
|
| uplot hist --nbins 20
|
48
73
|
```
|
49
74
|
|
@@ -63,6 +88,14 @@ curl -sL https://git.io/AirPassengers \
|
|
63
88
|
<img alt="lineplot" src="https://user-images.githubusercontent.com/5798442/101999825-24c5ec80-3d24-11eb-99f4-c642e8d221bc.png">
|
64
89
|
</p>
|
65
90
|
|
91
|
+
```sh
|
92
|
+
# For offline users: Calculates sin values (0-2*pi) and plots a sine wave.
|
93
|
+
python3 -c '
|
94
|
+
from math import sin, pi
|
95
|
+
data = "\n".join(f"{i*pi/50}\t{sin(i*pi/50)}" for i in range(101))
|
96
|
+
print(data)' | uplot line
|
97
|
+
```
|
98
|
+
|
66
99
|
### scatter
|
67
100
|
|
68
101
|
```sh
|
@@ -75,6 +108,12 @@ curl -sL https://git.io/IRIStsv \
|
|
75
108
|
<img alt="scatter" src="https://user-images.githubusercontent.com/5798442/101999827-27284680-3d24-11eb-9903-551857eaa69c.png">
|
76
109
|
</p>
|
77
110
|
|
111
|
+
|
112
|
+
```sh
|
113
|
+
# For offline users
|
114
|
+
cat test/fixtures/iris.csv | cut -f1-4 -d, | uplot scatter -H -d, -t IRIS
|
115
|
+
```
|
116
|
+
|
78
117
|
### density
|
79
118
|
|
80
119
|
```sh
|
@@ -87,6 +126,11 @@ curl -sL https://git.io/IRIStsv \
|
|
87
126
|
<img alt="density" src="https://user-images.githubusercontent.com/5798442/101999828-2abbcd80-3d24-11eb-902c-2f44266fa6ae.png">
|
88
127
|
</p>
|
89
128
|
|
129
|
+
```sh
|
130
|
+
# For offline users
|
131
|
+
cat test/fixtures/iris.csv | cut -f1-4 -d, | uplot density -H -d, -t IRIS
|
132
|
+
```
|
133
|
+
|
90
134
|
### boxplot
|
91
135
|
|
92
136
|
```sh
|
@@ -99,8 +143,21 @@ curl -sL https://git.io/IRIStsv \
|
|
99
143
|
<img alt="boxplot" src="https://user-images.githubusercontent.com/5798442/101999830-2e4f5480-3d24-11eb-8891-728c18bf5b35.png">
|
100
144
|
</p>
|
101
145
|
|
146
|
+
```sh
|
147
|
+
# For offline users
|
148
|
+
cat test/fixtures/iris.csv | cut -f1-4 -d, | uplot boxplot -H -d, -t IRIS
|
149
|
+
```
|
150
|
+
|
102
151
|
### count
|
103
152
|
|
153
|
+
Count processes by user ID.
|
154
|
+
|
155
|
+
```sh
|
156
|
+
ps aux | awk '{print $1}' | uplot count
|
157
|
+
```
|
158
|
+
|
159
|
+
Count the number of chromosomes where genes are located.
|
160
|
+
|
104
161
|
```sh
|
105
162
|
cat gencode.v35.annotation.gff3 \
|
106
163
|
| grep -v '#' | grep 'gene' | cut -f1 \
|
@@ -111,7 +168,6 @@ cat gencode.v35.annotation.gff3 \
|
|
111
168
|
<img alt="count" src="https://user-images.githubusercontent.com/5798442/101999832-30b1ae80-3d24-11eb-96fe-e5000bed1f5c.png">
|
112
169
|
</p>
|
113
170
|
|
114
|
-
In this example, YouPlot counts the number of chromosomes where genes are located.
|
115
171
|
* [GENCODE - Human Release](https://www.gencodegenes.org/human/)
|
116
172
|
|
117
173
|
Note: `count` is not very fast because it runs in a Ruby script.
|
@@ -157,7 +213,7 @@ The following sub-commands are available.
|
|
157
213
|
|
158
214
|
* `-o`
|
159
215
|
* By default, the plot is output to **standard error output**.
|
160
|
-
* If you want to output to standard
|
216
|
+
* If you want to output to standard output, Use hyphen ` -o -` or no argument `uplot s -o | `.
|
161
217
|
|
162
218
|
### Output the input data
|
163
219
|
|
data/lib/youplot/parser.rb
CHANGED
@@ -189,7 +189,7 @@ module YouPlot
|
|
189
189
|
scatter s draw a scatter plot
|
190
190
|
density d draw a density plot
|
191
191
|
boxplot box draw a horizontal boxplot
|
192
|
-
count c draw a
|
192
|
+
count c draw a barplot based on the number of
|
193
193
|
occurrences (slow)
|
194
194
|
colors color show the list of available colors
|
195
195
|
|
data/lib/youplot/version.rb
CHANGED
metadata
CHANGED
@@ -1,15 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: youplot
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- kojix2
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-07-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: csv
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
13
27
|
- !ruby/object:Gem::Dependency
|
14
28
|
name: unicode_plot
|
15
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -50,7 +64,7 @@ homepage: https://github.com/red-data-tools/YouPlot
|
|
50
64
|
licenses:
|
51
65
|
- MIT
|
52
66
|
metadata: {}
|
53
|
-
post_install_message:
|
67
|
+
post_install_message:
|
54
68
|
rdoc_options: []
|
55
69
|
require_paths:
|
56
70
|
- lib
|
@@ -58,15 +72,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
58
72
|
requirements:
|
59
73
|
- - ">="
|
60
74
|
- !ruby/object:Gem::Version
|
61
|
-
version: 2.
|
75
|
+
version: 2.5.0
|
62
76
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
63
77
|
requirements:
|
64
78
|
- - ">="
|
65
79
|
- !ruby/object:Gem::Version
|
66
80
|
version: '0'
|
67
81
|
requirements: []
|
68
|
-
rubygems_version: 3.
|
69
|
-
signing_key:
|
82
|
+
rubygems_version: 3.5.11
|
83
|
+
signing_key:
|
70
84
|
specification_version: 4
|
71
85
|
summary: A command line tool for Unicode Plotting
|
72
86
|
test_files: []
|