plotly.py icon indicating copy to clipboard operation
plotly.py copied to clipboard

When my data volume is too large, the igure displayed by the browser is blank

Open Zxlan opened this issue 3 years ago • 2 comments

My code : pointclouds = pointclouds.detach().cpu().subsample(max_points_per_pointcloud) verts = pointclouds.points_packed() features = pointclouds.features_packed()

color = None if features is not None: if features.shape[1] == 4: # rgba template = "rgb(%d, %d, %d, %f)" rgb = (features[:, :3].clamp(0.0, 1.0) * 255).int() color = [template % (*rgb_, a_) for rgb_, a_ in zip(rgb, features[:, 3])]

if features.shape[1] == 3:
    template = "rgb(%d, %d, %d)"
    rgb = (features.clamp(0.0, 1.0) * 255).int()
    color = [template % (r, g, b) for r, g, b in rgb]

row = subplot_idx // ncols + 1 col = subplot_idx % ncols + 1 fig.add_trace( go.Scatter3d( x=verts[:, 0], y=verts[:, 1], z=verts[:, 2], marker={"color": color, "size": marker_size}, mode="markers", name=trace_name, ), row=row, col=col, )

there are more than 300,000 points in pointclouds the figure displayed by the browser is blank,any suggestion?

Zxlan avatar May 18 '22 12:05 Zxlan

same problem ,did you solve this problem ,if you solve contract me ,thanks a lot.

WXY-Belief avatar Jun 02 '22 14:06 WXY-Belief

@WXY-Belief I researched the code and found that plotly relies on JavaScript, and browsers have memory constraints on JavaScript. You can try to use a browser with no memory limit to display, it may be useful

Zxlan avatar Jun 06 '22 02:06 Zxlan