Simple and complete plot gui module for Deno local scripts to provide a helper for science computing.
Attributes
Includes Deno configuration
Repository
Current version released
2 years ago
Dependencies
github.com
skypack.dev
chart.js@3.7
std
Deplot
Simple and complete Plot gui module for Deno local scripts to provide a helper for science computing.
Dependencies
Use Webview for window managing and plots libraries for tracing.
WARNING: Still under active development, GChart is not supported, deplot.screenshot and deplot.update neither.
Usage
All the modules are exposed in mod.ts
import { Datas, Deplot, Plotly } from 'https://deno.land/x/deplot/mod.ts';
const deplot = new Deplot('Plotly');
const trace: Plotly.Data = {
x: ['Zebras', 'Lions', 'Pelicans'],
y: [90, 40, 60],
type: 'bar',
name: 'New York Zoo',
};
const layout: Partial<Plotly.Layout> = {
title: 'Hide the Modebar',
showlegend: true,
};
const datas: Datas = { data: [trace], layout, config: { editable: true } };
deplot.plot(datas, { title: 'My plot', size: [800, 600] });
const trace2: Plotly.Data = {
x: [1, 2, 3, 4, 5],
y: [4, 0, 4, 6, 8],
mode: 'lines+markers',
type: 'scatter',
};
const datas2 = { data: [trace2], layout };
deplot.plot(datas, { title: 'My second plot', size: [450, 450] });
Examples
deno run --allow-read --allow-write --allow-net --allow-run --allow-env --allow-ffi --unstable --no-check https://deno.land/x/deplot/examples/plotly.ts
deno run --allow-read --allow-write --allow-net --allow-run --allow-env --allow-ffi --unstable --no-check https://deno.land/x/deplot/examples/chartjs.ts