iamnotacola

Untitled

Oct 3rd, 2018
211
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. import plotly.plotly as py
  2. import plotly.graph_objs as go
  3.  
  4. random_x = [1, 2, 3, 4, 5]
  5. random_y = [5, 4, 3, 2, 1]
  6.  
  7. # Create a trace
  8. trace = go.Scatter(
  9. x = random_x,
  10. y = random_y,
  11. mode = 'markers'
  12. )
  13.  
  14. data = [trace]
  15.  
  16. # Plot and embed in ipython notebook!
  17. py.iplot(data, filename='basic-scatter')
  18.  
  19. # or plot with: plot_url = py.plot(data, filename='basic-line')
Advertisement
Add Comment
Please, Sign In to add comment