nodeplotlib
nodeplotlib copied to clipboard
bug: plot type should also work implicitly
When using with typescript and include the type in the plotdata, tslint throws
const trace = {x: [1, 2], y: [1, 2], type: 'bar'};
plot([trace]); // type: string not compatible with type: 'scatter' | 'lines' | ...
Current workaround: Explicitly name the type of the plotdata.
import { plot, Plot } from 'nodeplotlib';
const trace: Plot = {x: [1, 2], y: [1, 2], type: 'bar'};
plot([trace]);