jens commited on
Commit
f8b3205
·
1 Parent(s): b27df3d

matplotlib

Browse files
Files changed (1) hide show
  1. utils.py +6 -4
utils.py CHANGED
@@ -177,10 +177,12 @@ def PCL3(image):
177
  sizes = np.zeros(colors.shape)
178
  sizes[:] = 0.01
179
  colors = [tuple(c) for c in colors]
180
- #ax = Axes3D(fig)
181
- data = {'x': points[:, 0], 'y': points[:, 1], 'z': points[:, 2], 'sizes': sizes[:, 0]}
182
- df = pd.DataFrame(data)
 
 
183
  # Step 6: Create a 3D scatter plot using Plotly Express
184
- fig = px.scatter_3d(df, x='x', y='y', z='z', color=colors, size="sizes")
185
 
186
  return fig
 
177
  sizes = np.zeros(colors.shape)
178
  sizes[:] = 0.01
179
  colors = [tuple(c) for c in colors]
180
+ fig = plt.figure()
181
+ ax = fig.add_subplot(111, projection='3d')
182
+ ax.scatter(points[:, 0], points[:, 1], points[:, 2], c=colors, s=0.01)
183
+ #data = {'x': points[:, 0], 'y': points[:, 1], 'z': points[:, 2], 'sizes': sizes[:, 0]}
184
+ #df = pd.DataFrame(data)
185
  # Step 6: Create a 3D scatter plot using Plotly Express
186
+ #fig = px.scatter_3d(df, x='x', y='y', z='z', color=colors, size="sizes")
187
 
188
  return fig