반응형

matplotlib의 scatter 만들기 . 그래프


Scatter Plots in Python  https://plot.ly/python/line-and-scatter/
reference : https://plot.ly/python/reference/#scatter


plot 버전 체크  


>>import plotly
>>plotly.__version__



scatter 만들기


import plotly.plotly as py

import plotly.graph_objs as go


# Create random data with numpy

import numpy as np


N = 1000

random_x = np.random.randn(N)

random_y = np.random.randn(N)


# Create a trace

trace = go.Scatter(

    x = random_x,

    y = random_y,

    mode = 'markers'

)


data = [trace]


# Plot and embed in ipython notebook!

py.iplot(data, filename='basic-scatter')


# or plot with: plot_url = py.plot(data, filename='basic-line')



...


반응형

+ Recent posts