Usage from JavaScript
Vanilla JavaScript
Section titled “Vanilla JavaScript”npm install @pluot/coreReact component
Section titled “React component”The @pluot/react NPM package provides the <Pluot /> React component.
npm install @pluot/react- width
- height
- plotId
- plotType
- storeName
- plotParams
- mode = "2d"
- marginBottom = 0.0
- marginLeft = 0.0
- marginTop = 0.0
- marginRight = 0.0
- aspectRatioMode = "contain" // "ignore", "contain", "cover"
- format = "vector" // "vector", "raster"
Example
Section titled “Example”import React from 'react';import { Pluot } from '@pluot/react';import { FetchStore } from 'zarrita';
const store = new FetchStore('https://example.com/my_dataset.zarr');
export function MyPlot(props) { return ( <Pluot width={500} height={500} plotId={"docs-example-scatterplot"} plotType={"LayeredPlot"} store={store} plotParams={{ x_key: "/n_1000000/x_coords", y_key: "/n_1000000/y_coords", color_key: "/n_1000000/class_labels", point_radius: 5.0, }} mode={"2d"} /> );}