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

Plotly · Function

px.scatter_polar

Creates an interactive polar scatter plot, mapping observations to radial and angular coordinates. Marker appearance can encode additional variables such as color, symbol, and size.

How it works

px.scatter_polar creates a Plotly figure whose points use radial coordinates from r and angular coordinates from theta. Optional encodings such as color, symbol, and size add visual dimensions, while range_theta, start_angle, and direction control the angular domain and orientation.

Syntax

plotly.express.scatter_polar(data_frame=None, r=None, theta=None, color=None, symbol=None, size=None, hover_name=None, hover_data=None, custom_data=None, text=None, animation_frame=None, animation_group=None, category_orders=None, labels=None, color_discrete_sequence=None, color_discrete_map=None, color_continuous_scale=None, range_color=None, color_continuous_midpoint=None, symbol_sequence=None, symbol_map=None, opacity=None, size_max=None, marginal=None, trendline=None, trendline_options=None, trendline_color_override=None, trendline_scope=None, log_r=False, range_r=None, range_theta=None, start_angle=90, direction=None, log_theta=False, theta_order=None, height=None, width=None, template=None, facet_row=None, facet_col=None, facet_col_wrap=0, facet_row_spacing=None, facet_col_spacing=None, animation_opts=None, render_mode='auto', base=None, marks=None, title=None, subtitle=None, width=None, height=None)

Parameters

NameTypeDescription
data_frameDataFrame or array-likeOptional data frame supplying columns used by the plot and its encodings.
rstr or array-likeRadial coordinate values or a data-frame column name.
thetastr or array-likeAngular coordinate values or a data-frame column name.
colorstr or array-likeVariable controlling marker color.
symbolstr or array-likeVariable controlling marker symbol.
sizestr or array-likeVariable controlling marker size.
range_thetalist or array-likeAngular interval to display.
start_anglenumberInitial angular orientation.
directionstrAngular direction, such as clockwise or counterclockwise.
render_modestrRendering mode, including WebGL support.

Returns

A Plotly Figure object representing a polar scatter plot.

Key points

  • The chart positions observations using two dimensions: distance from the origin and angle around it.
  • Use scatter_polar for point marks; choose line_polar when the polar observations should be connected.
  • Import plotly.express as px to create a complete figure through one high-level function call.
  • Color, symbol, and size can encode additional data columns or sequences beyond radial and angular position.
  • start_angle sets the angular starting orientation, while direction chooses clockwise or counterclockwise progression.

Common mistakes

  • Use r for radial values and theta for angular values; swapping them changes the coordinate system.
  • A partial polar view requires range_theta; otherwise the chart can cover the full angular domain.

Example: Create a polar scatter plot

import plotly.express as px

fig = px.scatter_polar(
    r=[1, 2, 3, 2],
    theta=[0, 90, 180, 270],
    color=["a", "b", "a", "b"],
    range_theta=[0, 360],
    start_angle=0,
    direction="counterclockwise",
)
fig.show()

Creates a polar scatter figure from radial and angular coordinates, with point colors grouped by category.

When to use it

Plot radial and angular measurements

Directional measurements such as wind observations or bearings.

Encode groups with marker styling

Comparing categories around a circular domain.

Build partial-circle visualizations

Displaying a sector instead of a complete circle.

Use WebGL for larger point sets

Rendering many polar points interactively.

Interview questions

QWhat does px.scatter_polar produce, and what are its core coordinate arguments?

It returns a Plotly Figure generated from radial and angular data. Each row of a supplied data frame becomes a plotted polar-scatter point, while r and theta identify its coordinates.

Follow-up: How would you orient a partial-circle chart? Set range_theta for the angular interval, then use start_angle and direction to control its orientation.

QHow are data dimensions represented in a polar scatter chart?

The function maps values in r to the radial axis and values in theta to the angular axis. Additional arguments can encode categories or magnitudes through properties such as color, symbol, and size.

Follow-up: Which arguments can restrict the angular display? Use range_theta for the interval; start_angle and direction adjust its orientation.

QHow can scatter_polar be used with larger datasets?

Plotly Express supports render_mode for scatter_polar, including WebGL rendering for larger point sets. The result remains a Plotly figure that can be displayed with fig.show().

Follow-up: What trade-off should be considered when enabling WebGL? It can improve rendering performance for many points, but it changes the rendering backend and may affect feature support.

  • px.line_polar
  • px.bar_polar
  • go.Scatterpolar
  • plotly.express

Source: plotly.express : high-level interface for data visualization. Checked 2026-10-15.