dist-plot-log v1.0.3
Distribution Plot Logger
A simple TypeScript library that estimates and logs a text-based probability density function (PDF) plot of your data to the console using asciichart.
Installation
Install the package via npm:
npm install dist-plot-log
Usage
You can use the package in both JavaScript and TypeScript projects.
TypeScript
import { logDistributionPlot } from "dist-plot-log";
const data = [1, 2, 3, 4, 5, 3, 2, 1];
logDistributionPlot(data, "My Data Plot");
JavaScript
const { logDistributionPlot } = require("dist-plot-log");
const data = [1, 2, 3, 4, 5, 3, 2, 1];
logDistributionPlot(data, "My Data Plot");
In the above examples:
- The first argument is an array of numerical data.
- The second argument is an optional title for the plot.
Development
Installing packages
yarn
Building
Before publishing or testing changes, compile the TypeScript source:
yarn build
Running Tests
We use Jest for testing. To run the test suite:
yarn test
Committing Changes
We use Commitizen for standardized commit messages. Instead of git commit
, run:
yarn commit
Automated Releases
We use Semantic Release for automated versioning and release management. Make sure your commits follow Conventional Commits standards so that new versions are released automatically.
Contributing
Contributions are welcome! Please see the CONTRIBUTING.md file for guidelines.
License
This project is licensed under the MIT License.