Python Plot

Scatter plot:

python scatter plot

import matplotlib.pyplot as plt

x_plot=Y[:,0]
y_plot=Y[:,1]
# y_plot=pd.DataFrame(y_plot)
plt.plot(y_plot, x_plot, 'o', color='black');

2nd example:


import matplotlib.pyplot as plt
import plotly
import plotly.graph_objs as go
from plotly.offline import *

trace3d = go.Scatter3d(
x = G_array[:,100],
y = G_array[:,101],
z = G_array[:,201],
mode = "markers",
name = "Cluster 0",
marker = dict(color = 'rgba(255, 128, 255, 0.8)'),
text = None)

fig = dict(data = trace3d)
iplot(fig)
plotly.offline.plot(fig, filename='3d_G.html')

Other resources:

3D plotting with matplotlib

Leave a Reply

Your email address will not be published. Required fields are marked *