Thanks to visit codestin.com
Credit goes to github.com

Skip to content
/ Deplot Public

Simple and complete plot gui module for Deno local scripts to provide a helper for science computing.

Notifications You must be signed in to change notification settings

JOTSR/Deplot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

95 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


Deplot

Simple and complete Plot gui module for Deno local scripts to provide a helper for science computing.

deno module deno compatibility vr scripts deno doc

Dependencies

Use WebUI for window managing and plots libraries for tracing.

Supports Plotly.js and Chart.js for plotting.

Usage

All the modules are exposed in mod.ts

import { Datas, Deplot, Plotly } from 'https://deno.land/x/deplot/mod.ts'

const barPlot = new Deplot(
	'Plotly',
	{
		title: 'My bar plot',
		size: { width: 800, height: 600 },
	},
)

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 } }

await barPlot.plot(datas)

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 }

new Deplot('Plotly').plot(datas)

Documentation

Examples

Plotly.js

deno run --allow-read --allow-write --allow-env --allow-ffi --unstable https://deno.land/x/deplot/examples/plotly.ts

Chart.js

deno run --allow-read --allow-write --allow-env --allow-ffi --unstable https://deno.land/x/deplot/examples/chartjs.ts

For flags see Deno WebUI/Security flags

About

Simple and complete plot gui module for Deno local scripts to provide a helper for science computing.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published