D3xterjs/pydexter

Name: pydexter

Owner: D3xter

Description: Simple plotting for Python. Python wrapper for D3xter - render charts in the browser with simple Python syntax.

Created: 2016-06-14 20:25:21.0

Updated: 2018-02-02 14:49:06.0

Pushed: 2018-02-03 16:49:21.0

Homepage: http://d3xterjs.github.io/

Size: 231

Language: Python

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

PyDexter

Simple plotting for Python. Python wrapper for D3xter - render charts in the browser with simple Python syntax.

Examples

Setup
p install PyDexter
thon
from PyDexter import PyDexter
pydex = PyDexter()
API & Examples
Histogram
rt numpy as np

 = np.random.rand(1000)
x.hist(nums)
Scatter
rt numpy as np
np.random.rand(100)
x * 2

x.scatter(x)



x.scatter(x, y)
Plot
rt numpy as np

x.plot({
abels': ['some points', 'a line'],
atasets': [
{
  'x': range(100),
  'y': np.random.rand(100),
},
{
  'x': [0, 99],
  'y': [0, 1],
  'color': 'black',
  'line': 'true'
}


Pie
x.pie({
alues': [1, 2, 3, 4],
abels': ['a', 'b', 'c', 'd']

Timeline
x.timeline([
'date': '1914-07-28', 'label': 'WW1' },
'date': '1939', 'label': 'WW2' },
'date': '1950-01-01', 'label': 'The Fifties'},
'date': '1950-01-01', 'label': 'A Date Collision'},

Bar Chart
x.bar({
abels': ["A", "B", "C"],
roups': ["first", "second", "third"],
atasets': [
{
  'values': [1, 2, 3],
  'color': 'red'
},
{
  'values': [4, 3, 1],
  'color': 'blue'
},
{
  'values': [2, 2, 5],
}


Configuration
x.configure({
eight': 500,
idth': 700,
itle': 'My First Chart',
Lab': 'x-axis label',
Lab': 'y-axis label'


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.