How to use the bqplot.Mark function in bqplot

To help you get started, we’ve selected a few bqplot examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github glue-viz / bqplot-image-gl / js / lib / imagegl.js View on Github external
y_scale.del_domain([], this.model_id + "_y");
            }
        }
    }

}

ImageGLModel.serializers = Object.assign({}, bqplot.MarkModel.serializers,
                                         { x: serialize.array_or_json,
                                           y: serialize.array_or_json,
                                           image: { deserialize: (obj, manager) => {
                                               let state = {buffer: obj.value, dtype: obj.dtype, shape: obj.shape};
                                               return jupyter_dataserializers.JSONToArray(state);
                                           }}});

class ImageGLView extends bqplot.Mark {

    render() {
        var base_render_promise = super.render();
        window.last_image = this;

        this.image_plane = new THREE.PlaneBufferGeometry( 1.0, 1.0 );
        this.image_material = new THREE.ShaderMaterial( {
                    uniforms: {
                        image: { type: 't', value: null },
                        // the domain of the image pixel data (for intensity only, for rgb this is ignored)
                        // these 3 uniforms map one to one to the colorscale
                        colormap: { type: 't', value: null },
                        color_min: {type: 'f', value: 0.0},
                        color_max: {type: 'f', value: 1.0},
                        // the type of scale (linear/log) for x/y will be substituted in the shader
                        // map from domain

bqplot

bqplot

Apache-2.0
Latest version published 2 months ago

Package Health Score

78 / 100
Full package analysis

Popular bqplot functions