A simple TypeScript library that estimates and logs a text-based probability density function (PDF) plot of your data to the console using asciichart.
Install the package via npm:
npm install dist-plot-logYou can use the package in both JavaScript and TypeScript projects.
import { logDistributionPlot } from "dist-plot-log";
const data = [1, 2, 3, 4, 5, 3, 2, 1];
logDistributionPlot(data, "My Data Plot");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.
yarnBefore publishing or testing changes, compile the TypeScript source:
yarn buildWe use Jest for testing. To run the test suite:
yarn testWe use Commitizen for standardized commit messages. Instead of git commit, run:
yarn commitWe use Semantic Release for automated versioning and release management. Make sure your commits follow Conventional Commits standards so that new versions are released automatically.
Contributions are welcome! Please see the CONTRIBUTING.md file for guidelines.
This project is licensed under the MIT License.