ascii-boxplot
Advanced tools
Comparing version 1.0.1 to 1.0.2
{ | ||
"name": "ascii-boxplot", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "small configurable boxplot utility for the console", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -28,3 +28,3 @@ <!-- markdownlint-disable MD004 MD007 MD010 MD041 MD022 MD024 MD032 MD036 --> | ||
* `sourceData` object or array of samples. The keys are used as labels an array of sorted samples | ||
* `sourceData` object or array of samples. The object keys or array indices are used as labels | ||
* `options` optionsal configuration object | ||
@@ -51,3 +51,3 @@ | ||
* `1..9` are the templates for a given quantile size. The even chars are for the actual values, the odd ones are repeated in-between | ||
* `1..9` are the templates for a given quantile size. More info in the [template section](#templlate) below | ||
* `cols` the maximum width of the screen in characters | ||
@@ -61,4 +61,26 @@ * `padding` left and right padding (after the longest label and before the right edge) | ||
### Templates | ||
There are different templates for different number of probability points. | ||
For example, the default probability `[0, .02, .09, .25, .50, .75, .91, .98, 1]` | ||
has nine points and the display of the resulting values will use template #9. | ||
A template string has `2n+1` characters and has the form `svsvsv...` | ||
where alternating characters are used for actual values `v` and for spacing. | ||
Examples: | ||
```javascript | ||
boxplot(data, { | ||
probs: [0.25, 0.5, 0.75], | ||
3:`.L-M-H.` | ||
}) // --> something like '....L----M---H....' | ||
boxplot(data, { | ||
probs: [0.09, 0.25, 0.5, 0.75, 0.], | ||
3:` |-##|##-| ` | ||
}) // --> something like ' |---###|####-----| ' | ||
``` | ||
## License | ||
Released under the [MIT License](http://www.opensource.org/licenses/MIT) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
6470
84