Show Sidebar Hide Sidebar

Radar Charts in Pandas

How to graph radar charts in pandas.

# Learn about API authentication here: https://plot.ly/pandas/getting-started
# Find your api_key here: https://plot.ly/settings/api

import plotly.plotly as py
import plotly.graph_objs as go

data = [go.Scatterpolar(
  r = [39, 28, 8, 7, 28, 39],
  theta = ['A','B','C', 'D', 'E', 'A'],
  fill = 'toself'
)]

layout = go.Layout(
  polar = dict(
    radialaxis = dict(
      visible = True,
      range = [0, 50]
    )
  ),
  showlegend = False
)

fig = go.Figure(data=data, layout=layout)
py.iplot(fig, filename = "radar/basic")
# Learn about API authentication here: https://plot.ly/pandas/getting-started
# Find your api_key here: https://plot.ly/settings/api


import plotly.plotly as py
import plotly.graph_objs as go

data = [
    go.Scatterpolar(
      r = [39, 28, 8, 7, 28, 39],
      theta = ['A','B','C', 'D', 'E', 'A'],
      fill = 'toself',
      name = 'Group A'
    ),
    go.Scatterpolar(
      r = [1.5, 10, 39, 31, 15, 1.5],
      theta = ['A','B','C', 'D', 'E', 'A'],
      fill = 'toself',
      name = 'Group B'
    )
]

layout = go.Layout(
  polar = dict(
    radialaxis = dict(
      visible = True,
      range = [0, 50]
    )
  ),
  showlegend = False
)

fig = go.Figure(data=data, layout=layout)
py.iplot(fig, filename = "radar/multiple")
Still need help?
Contact Us

For guaranteed 24 hour response turnarounds, upgrade to a Developer Support Plan.