Skip to content

Flint: Added 3D scatter plot

Valentin Valls requested to merge flint-scatter-3d into master

This PR provides a 3D scatter plot.

This was requested for testing collision detection at BM31.

Screenshot_from_2022-07-20_14-59-05

It was tested with data provided by the device which is checking collision detection

DEMO_SESSION [1]: import numpy
             ...: n = numpy.load("/users/valls/Downloads/data", allow_pickle=True)
             ...: xyz = numpy.array(n[()]["pts3d"])
             ...: value = n[()]["labels"]
             ...: print("labels", numpy.unique(value))
             ...: f = flint()
             ...: p = f.get_plot("scatter3d", unique_name="my scatter")
             ...: p.set_colormap(lut="Accent", vmin=-1.5, vmax=6.5)
             ...: p.set_marker("o")
             ...: x = xyz[:, 0]
             ...: y = xyz[:, 1]
             ...: z = xyz[:, 2]
             ...: p.set_data(x,y,z,value)

Merge request reports

Loading