Polar Plots

A polar plot positions each point by an angle and a radius instead of x and y, wrapping your data around a circle — ideal for directions, cycles, and radar-style comparisons.

Learn Polar Plots in our free Matplotlib course — a beginner-friendly interactive lesson with worked examples, a practice exercise and a quick reference.

Part of the free Matplotlib course at LearnCodingFast — hands-on lessons with examples you run in your browser, plus practice exercises and a quick quiz.

In this lesson you'll create polar axes, plot curves with theta and r, build a polar bar (radar-style) chart, and control the angle direction, offset, and radial ticks.

Polar plots live on special axes. Create them by passing subplot_kw={"projection": "polar"} to plt.subplots() . Then plot as usual, but the first argument is the angle theta in radians and the second is the radius r . The result wraps around a circle instead of running along a straight axis.

What you'll see: a symmetrical flower-like curve with several petals radiating from the center. The angular gridlines fan out like spokes and the circular gridlines mark the radius, giving the plot its distinctive round frame.

Call ax.bar() on polar axes and each bar becomes a wedge fanning out from the center — a layout that reads like a radar or wind-rose chart. Space the categories evenly around the circle with np.linspace(0, 2 * np.pi, n, endpoint=False) , then label each angle with ax.set_xticks() and ax.set_xticklabels() .

What you'll see: six green wedges spreading out from the center like slices of a fan, each reaching a different distance based on its stat. The category names sit around the rim, making it easy to spot that Defense (the longest wedge) is this player's strength.

By default zero degrees points right and angles grow counter-clockwise — but compasses and clocks don't work that way. Use ax.set_theta_zero_location("N") to put zero at the top and ax.set_theta_direction(-1) to sweep clockwise. Tidy up the radius with ax.set_rticks() and cap it with ax.set_rmax() .

What you'll see: a wind rose where North sits at the very top and the directions run clockwise N to E to S to W, just like a real compass. The blue wedges show wind strength per direction, and the radial rings are labeled at 2, 4, 6, and 8.

Replace each ___ to create polar axes and plot a spiral that runs clockwise.

You forgot the projection. Pass subplot_kw={"projection": "polar"} to plt.subplots() .

Angles must be in radians . Convert degrees with np.radians(deg) or build them from np.pi .

Use endpoint=False in np.linspace so the last angle doesn't duplicate the first.

Draw a radar-style line chart comparing two players across six skills. Close each loop so the shapes connect all the way around.

Lesson complete — you can plot around a circle!

You created polar axes, plotted curves with theta and r, built radar-style polar bars, and controlled the zero location, direction, and radial ticks to match real-world conventions.

🚀 Up next: Density: hexbin & hist2d — visualize where points pile up.

Practice quiz

How do you create polar axes with plt.subplots()?

  • plt.subplots(polar=True)
  • plt.subplots(subplot_kw={'projection': 'polar'})
  • plt.subplots(kind='polar')
  • plt.subplots(mode='polar')

Answer: plt.subplots(subplot_kw={'projection': 'polar'}). Pass subplot_kw={'projection': 'polar'} to make the axes polar.

On polar axes, what is the first argument to ax.plot(theta, r)?

  • The angle theta
  • The radius r
  • The x coordinate
  • The color

Answer: The angle theta. The first argument is the angle theta (in radians), the second is the radius.

What units does Matplotlib expect for polar angles?

  • Degrees
  • Gradians
  • Radians
  • Percent

Answer: Radians. Polar angles are in radians; a full circle is 2*np.pi.

Which call moves the zero angle to the top of the plot?

  • ax.set_rmax('N')
  • ax.set_theta_offset('N')
  • ax.set_theta_zero_location('N')
  • ax.set_zero('top')

Answer: ax.set_theta_zero_location('N'). ax.set_theta_zero_location('N') puts the 0 angle at the top.

How do you make angles increase clockwise?

  • ax.set_theta_direction(-1)
  • ax.set_clockwise(True)
  • ax.set_theta_zero_location(-1)
  • ax.reverse_theta()

Answer: ax.set_theta_direction(-1). ax.set_theta_direction(-1) sweeps clockwise instead of counter-clockwise.

Why use endpoint=False in np.linspace for polar categories?

  • To speed up plotting
  • To stop the last angle duplicating the first
  • To use degrees instead of radians
  • To reverse the direction

Answer: To stop the last angle duplicating the first. endpoint=False keeps categories evenly spaced without a doubled wedge at the top.

Which method draws radar-style wedges on polar axes?

  • ax.wedge()
  • ax.radar()
  • ax.bar()
  • ax.pie()

Answer: ax.bar(). Calling ax.bar() on polar axes draws wedges fanning out from the center.

Which call sets which radial rings are labeled?

ax.set_rticks() chooses the radial tick positions.

By default, where does zero degrees point on polar axes?

  • Up (north)
  • Down (south)
  • Left (west)
  • Right (east)

Answer: Right (east). By default 0 points right and angles grow counter-clockwise.

What does ax.set_rmax() do?

  • Sets the max angle
  • Caps the maximum radius
  • Sets the marker size
  • Reverses the radius

Answer: Caps the maximum radius. ax.set_rmax() limits the largest radius shown on the plot.