Guest User

Untitled

a guest
Nov 21st, 2018
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.82 KB | None | 0 0
  1. import plotly.graph_objs as go
  2. from plotly import plotly
  3. import plotly.offline as offline
  4. import numpy as np
  5.  
  6. # data
  7. x= np.genfromtxt(see data image)
  8. y= np.genfromtxt(see data image)
  9.  
  10. trace = [
  11. go.Scatterpolar(
  12. r = [y], #radial coordinates
  13. theta = [x], #angular coordinates
  14. mode = 'markers',
  15. marker = dict(
  16. color = 'peru'
  17. )
  18. )
  19. ]
  20.  
  21. layout = go.Layout(
  22. showlegend = True,
  23. polar = dict(
  24. domain = dict( # set chart size and position
  25. x = [0, 0.8],
  26. y = [0.3, 0.8]),
  27. sector = [0, 180], # set chart shape (half or full)
  28. angularaxis = dict(
  29. thetaunit = "degrees",
  30. dtick = 10),
  31. radialaxis = dict(
  32. range = [1, 8000])
  33. ))
  34.  
  35.  
  36. fig = go.Figure(data=trace, layout=layout)
  37. offline.plot(fig)
Add Comment
Please, Sign In to add comment