Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import plotly.graph_objs as go
- from plotly import plotly
- import plotly.offline as offline
- import numpy as np
- # data
- x= np.genfromtxt(see data image)
- y= np.genfromtxt(see data image)
- trace = [
- go.Scatterpolar(
- r = [y], #radial coordinates
- theta = [x], #angular coordinates
- mode = 'markers',
- marker = dict(
- color = 'peru'
- )
- )
- ]
- layout = go.Layout(
- showlegend = True,
- polar = dict(
- domain = dict( # set chart size and position
- x = [0, 0.8],
- y = [0.3, 0.8]),
- sector = [0, 180], # set chart shape (half or full)
- angularaxis = dict(
- thetaunit = "degrees",
- dtick = 10),
- radialaxis = dict(
- range = [1, 8000])
- ))
- fig = go.Figure(data=trace, layout=layout)
- offline.plot(fig)
Add Comment
Please, Sign In to add comment