Skip to content
masterclassBuddyTech Buzz5 fresh blogs · 5:00 AM IST

Plotly · Class

go.Scatterpolar

go.Scatterpolar is Plotly's generic polar scatter trace. Pair radial coordinates (r) with angular coordinates (theta) and optionally render markers, lines, or a filled region.

How it works

go.Scatterpolar creates a generic polar scatter trace. Supply radial coordinates with r and angular coordinates with theta, then choose trace rendering such as markers, lines, or a filled region.

Syntax

go.Scatterpolar(r=None, theta=None, mode=None, fill=None, **kwargs)

Parameters

NameTypeDescription
rarray-likeRadial coordinates for the trace's points; the documentation's examples pass a sequence of numeric values.
thetaarray-likeAngular coordinates for the trace's points; examples use numeric angles or categorical labels.
modestringControls how the trace is rendered, such as markers or lines.
fillstringControls whether and how the trace area is filled.

Returns

A Plotly Scatterpolar trace object.

Key points

  • Import the class from plotly.graph_objects when you need a lower-level polar scatter trace.
  • The r property contains radial data points, defining each point's distance from the center.
  • The theta property contains angular coordinates corresponding positionally to the radial values.
  • Configure the polar radial axis in the figure layout and make it visible when the chart needs radial scale guidance.

Common mistakes

  • For radar charts, angular values can be categorical labels rather than numeric angles.

Example: Filled radar chart

import plotly.graph_objects as go

fig = go.Figure(go.Scatterpolar(
    r=[1, 5, 2, 2, 3],
    theta=['processing cost', 'mechanical properties', 'chemical stability', 'thermal stability', 'device integration'],
    fill='toself'
))
fig.update_layout(
    polar=dict(radialaxis=dict(visible=True)),
    showlegend=False
)
fig.show()

Creates a filled radar-style polar trace from radial values and categorical angular labels.

When to use it

Custom polar scatter plots

You need direct control over a polar trace beyond Plotly Express.

Radar charts

You want a radar or spider chart with category labels around the angular axis.

Multi-series polar comparisons

You need to compare multiple radial series on one polar figure.

Interview questions

QWhen would you choose go.Scatterpolar?

Use go.Scatterpolar when Plotly Express is not a suitable starting point. Construct it as a trace, commonly with r for radial values and theta for angular coordinates, then place it in a go.Figure.

Follow-up: How would you create a radar chart? Use categorical angular labels and set fill='toself' to close and fill the polygon.

QWhat do r and theta represent?

The r array supplies distances from the polar origin, while theta supplies angular positions. The example documentation combines numeric radial values with numeric degree angles for a marker-only polar scatter.

Follow-up: How can the same trace represent a radar chart? Replace numeric angular positions with category labels and use a closed fill.

QHow do you build a radar-style chart with this class?

A radar chart can be made with a polar chart using categorical angular variables. In the documented example, fill='toself' fills the area enclosed by the trace, and the polar radial axis is made visible through layout configuration.

Follow-up: How can you display more than one radar series? Add multiple go.Scatterpolar traces to the figure, each with its own r values and shared category labels.

  • plotly.graph_objects.Figure
  • px.scatter_polar
  • px.line_polar

Source: Polar charts in Python - Plotly. Checked 2026-10-15.