gl-error-bars
Draws error bars around scatter points.
Example
var shell = clearColor: 0000 var camera = shellvar createAxes = var createErrorBars = var mat4 = var bounds = -5-5-5 555var errorbars axes shell shell
API
Constructor
var errorBars = require('gl-error-bars')(gl, options)
Creates a new error bar object.
gl
is a WebGL contextobject
is a collection of properties which are used to initialize the object
Returns A new error bar object
Methods
errorBars.draw(camera)
Draws the error bars
-
camera
is an object storing the parameters to drawcamera.model
is the model matrixcamera.view
is the view matrixcamera.projection
is the projection matrix
errorBars.update(options)
Updates the error bar object
position
is the position of each point in the ploterror
is an array of error bounds represented as[lo,hi]
for each pointcolor
a length 3 array of arrays giving the color of the error bars along each axis.lineWidth
is the width of the error bar lines in pixelscapSize
is the size of the cap for error barsclipBounds
is a box to which all error bars will be clipped
errorBars.dispose()
Destroy the error bars and release all associated resources
errorBars.bounds
Bounds on the error bar object for display purposes
Credits
(c) 2014 Mikola Lysenko. MIT License