Skip to content
This repository was archived by the owner on Feb 24, 2019. It is now read-only.

About

[WIP] A plotly transform for evaluating arbitrary functions

Resources

Stars

1 star

Watchers

1 watching

Forks

Latest commit

 

History

19 Commits

Folders and files

Repository files navigation

plotly-expression-transform

A plotly transform for evaluating arbitrary functions

experimental

Introduction

Highly experimental. Have realized I did the syntax all wrong. This module applies the transform dvar ← f(dvar, ivar) where dvar is a dependent variable and ivar is a single independent variable (or an array of independent variables).

Installation

Currently requires experimental plotly.js PR for transforms. Example requires unpublished module. Not published to npm. Can add to package.json from repo directly:

  "plotly-expresson-transform": "https://github.com/rreusser/plotly-expression-transform.git"

Example

var Plotly = require('plotly.js');

Plotly.register([require('plotly-expression-transform')]);

Plotly.plot('graph', [{
    x: [...],
    y: [...],
    transforms: {
        type: 'expression',
        expr: 'x * 0.01 + y^2',
        dvar: 'y',
        ivar: 'x'
    }
}]);

To Do

Better conflict resolution. What's the right size? The size of the independent variable? Or the size of the dependent variable? Zeros data if they don't match? Also dvar and ivar is bad. It should match independent variables to specific axes of the dependent variable for dimension > 1. Open an issue if you're (miraculously) reading this, have a good idea, and care.

License

© 2016 Ricky Reusser. MIT License.

About

[WIP] A plotly transform for evaluating arbitrary functions

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages