grafica de clustering en 3d python

Solutions on MaxInterview for grafica de clustering en 3d python by the best coders in the world

showing results for - "grafica de clustering en 3d python"
Katelynn
27 Feb 2019
1import plotly.plotly as py
2import pandas as pd
3
4df = pd.read_csv('https://raw.githubusercontent.com/plotly/datasets/master/alpha_shape.csv')
5df.head()
6
7scatter = dict(
8    mode = "markers",
9    name = "y",
10    type = "scatter3d",
11    x = df['x'], y = df['y'], z = df['z'],
12    marker = dict( size=2, color="rgb(23, 190, 207)" )
13)
14clusters = dict(
15    alphahull = 7,
16    name = "y",
17    opacity = 0.1,
18    type = "mesh3d",
19    x = df['x'], y = df['y'], z = df['z']
20)
21layout = dict(
22    title = '3d point clustering',
23    scene = dict(
24        xaxis = dict( zeroline=False ),
25        yaxis = dict( zeroline=False ),
26        zaxis = dict( zeroline=False ),
27    )
28)
29fig = dict( data=[scatter, clusters], layout=layout )
30# Use py.iplot() for IPython notebook
31py.iplot(fig, filename='3d point clustering')
32