October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsClean PCRecommendedOne scan can reveal what keeps slowing WindowsLook for cleanup and repair opportunities.Run ScanOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
World desk5 min

Matplotlib Theta Ticks in Polar Plots: Setting Angles, Labels and Formats

Set theta ticks on a Matplotlib polar plot with ax.set_thetagrids (angles in degrees), customise labels with formatters, and keep them stable during interactive zooming.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

To set theta ticks on a Matplotlib polar plot, call ax.set_thetagrids(angles, labels=...) on the polar axes. The angles argument is in degrees, even though the polar axis stores its native angle values in radians. The pyplot equivalent, plt.thetagrids(...), acts on the current polar plot. Those two calls cover fixed positions and custom names. For labels that must stay correct as the user pans or zooms, you need to configure the axis locator and formatter instead, and the sections below explain when each approach applies.

Set fixed theta positions and labels

A polar axes is created with projection="polar". Its angular axis is the theta axis, and set_thetagrids controls both where the angular gridlines fall and what text appears at each one. The method returns the gridline objects and the text label objects it created, so you can restyle them afterwards if needed.

As an Amazon Associate I earn from qualifying purchases.

Object-oriented form: ax.set_thetagrids()

Pass a sequence of angles in degrees and, optionally, a sequence of labels of the same length:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
import matplotlib.pyplot as plt

fig, ax = plt.subplots(subplot_kw={"projection": "polar"})
ax.set_thetagrids([0, 45, 90, 135, 180], labels=["N", "NE", "E", "SE", "S"])
plt.show()

Each label is attached to the angle at the same index. If you omit labels, or pass None, Matplotlib uses its default theta formatter and shows the angles as degrees.

#1 Best Overall
ForgeCore 10PCS Large Format Printer Sub Ink Tank Filter Compatible with Flora Zhongye Polar Plotter
  • Compatible with Flora Zhongye and Polar large format printers integration with your existing setup
  • Designed as a direct sub ink tank filter to maintain consistent ink flow and printer function
  • Engineered for use in professional printing environments where and print quality are essential
  • Helps clogs and in the ink delivery system extending the life of your printer components
  • Suitable for volume printing applications supporting continuous with minimal maintenance downtime

Pyplot form: plt.thetagrids()

The pyplot function accepts the same positions and labels and applies them to the current polar axes. The Matplotlib example gallery uses this form to place four compass-style labels:

plt.thetagrids(range(45, 360, 90), ("NE", "NW", "SW", "SE"))

Use the object-oriented form when a figure contains several axes or when you hold a reference to the axes. The pyplot form is convenient in short scripts where the current axes is the one you want.

Default labels: the theta formatter and locator

When you do not supply labels, Matplotlib’s ThetaFormatter takes the native radian value of each tick, converts it to degrees, and appends a degree symbol. The Matplotlib API reference for matplotlib.projections.polar describes it this way: “Used to format the theta tick labels. Converts the native unit of radians into degrees and adds a degree symbol.”

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #2
WoodJest 10PCS Large Format Printer Sub Ink Tank Filter Compatible with Infinity Flora Zhongye Polar Plotter
  • Compatible with Infinity Flora Zhongye and Polar large format printers integration with your existing printing system
  • Designed as a direct replacement for sub ink tank filters to maintain consistent ink flow and print head performance
  • Engineered for use in volume printing environments where filtration helps reduce clogs and downtime
  • Constructed with fine mesh material that effectively captures impurities while allowing steady ink transmission
  • Suitable for various ink types used in wide format plotters supporting long-term printer maintenance and efficiency

Tick positions come from ThetaLocator. In most views it delegates to its base locator. When the view spans the full circle, it switches to the familiar 45-degree positions. That is why a default full polar plot shows eight evenly spaced labels without any configuration.

Custom label text and format strings

There are two ways to change how labels look without supplying every label by hand.

Format strings with fmt

The fmt argument of set_thetagrids is passed to a FormatStrFormatter. The API reference notes that the value the format string receives is the angle in radians, not degrees. A format such as "%.2f" therefore prints a radian value. If you want degrees, the format string alone is not enough; use a function, as described next.

Rank #3
ASA CP-1 Fixed Aviation Plotter
  • Complete Navigation Tool in One Design: Combines a full-length distance ruler with an integrated 180 protractor for accurate course plotting and heading measurement on sectional charts
  • Sectional & Terminal Area Scales: Includes both Sectional (1:500,000) and Terminal Area (1:250,000) scales for precise distance measurement across multiple chart types
  • Clear, Easy-to-Read Layout: Made of sturdy transparent plastic with high-contrast markings-see your chart clearly while maintaining accurate alignment
  • Built-In Heading Protractor: Top-mounted semicircular protractor with clear degree markings (0-360 reference) simplifies course and wind correction setup
  • Quick NM & SM Reference: Dual scales for nautical and statute miles allow quick conversion and fast flight planning without extra tools

Function-based labels with FuncFormatter

When label text depends on logic, pass a formatter to the theta axis. A FuncFormatter receives the tick value in radians and the tick position, and returns a string:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
import math
from matplotlib import ticker

ax.xaxis.set_major_formatter(
    ticker.FuncFormatter(lambda x, pos: f"{round(math.degrees(x))}°")
)

The theta axis is the xaxis of a polar axes, while the radial axis is the yaxis. The locator decides where ticks go; the formatter decides what they say. Keep those two jobs separate when you design a label scheme.

Why styling disappears after you zoom or pan

The main pitfall is that set_thetagrids changes the properties of the tick instances that exist at the moment you call it. The API reference warns that later operations can create, delete or modify tick instances. Interactive panning and zooming are among those operations, so text you styled through set_thetagrids may not survive a view change.

Rank #4
Diitao 3PCS TB6600 Stepper Motor Driver,Single Axes Hybrid Stepper Motor 4A 9-42V for CNC Controller 32 Subdivision Upgrade(4A 9-42V)
  • TB6600 Stepper Motor Driver:9V-42V DC power supply, H-bridge bipolar constant phase current drive.6 modes 32 subdivisions,for 4-wire, 6-wire, 8-wire stepper motors.
  • Features:Smooth operation, strong anti-interference ability.High efficiency.Quick and simple operation, convenient and safe connection.
  • Protection Function:Energy-saving semi-automatic current locking function, with temperature protection, overcurrent protection, undervoltage protection, anti-reverse function.
  • Usage:Suitable for Nema 17, 23, 24 series stepper motor, with good coordination.It can also be used for labeling machine, laser cutting machine, plotter, engraving machine, for CNC machine tool and other equipment.
  • Package Include:3PCS TB6600 Stepper Motor Driver

If the labels must stay correct as the view changes, move the configuration to the axis level:

  1. Set the positions with a fixed locator on the theta axis, using radians, for example ax.xaxis.set_major_locator(ticker.FixedLocator(np.radians([0, 90, 180, 270]))) after importing NumPy as np.
  2. Set the text with a formatter on the same axis, either ticker.FixedFormatter with a list of names matching the locator, or the FuncFormatter shown above.
  3. Apply any styling, such as font size or colour, through the tick label settings after the locator and formatter are in place, and check the result after interacting with the plot.

Fixed positions and labels are simple and quick to write. Axis-level locators and formatters are the better choice when the plot will be panned, zoomed or redrawn in an interactive session.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Orientation and angular range are separate settings

Tick placement does not change where zero sits or which way angles increase. Those are controlled by separate methods, and each one has its own units. The table below summarises the calls covered by the Matplotlib polar reference.

Best Value
UcVdWkNEY Large Format Printer Sub Ink Tank Filter 10 Pack Compatible with Flora Zhongye Polar Plotter
  • Model Compatibility: Fits , Flora, Zhongye, and Polar large format printer plotters as stated in the product title.
  • Component Type: Functions as a sub ink tank filter designed for specific large format printing systems.
  • Package Quantity: Includes ten individual filter units to support multiple cycles for compatible machines.
  • Filtration Role: Serves as a direct functional to maintain standard ink within the tank.
  • Application Scope: Intended for use with large format printers requiring this specific sub tank filter design.
Goal Call Units and notes
Place angular gridlines and labels ax.set_thetagrids(angles, labels=...) Angles in degrees; affects current ticks only
Same, via pyplot plt.thetagrids(angles, labels) Angles in degrees; applies to the current polar axes
Change the label format string set_thetagrids(..., fmt=...) Format receives radians
Set zero location ax.set_theta_zero_location(loc, offset=...) Offset is always applied counterclockwise, whatever the direction setting
Set clockwise or counterclockwise increase ax.set_theta_direction(...) Controls the direction in which angles increase
Restrict visible angular range ax.set_thetalim(...) Positional arguments are radians; keyword arguments thetamin= and thetamax= are degrees

The Matplotlib polar demo restricts the visible range with set_thetamin(0) and set_thetamax(225), which is a useful pattern when a plot covers only a sector of the circle.

Choosing an approach

Situation Recommended approach
Static figure with a few named directions set_thetagrids with labels
Quick script using the current axes plt.thetagrids
Labels need logic, such as converting radians to degrees with a custom suffix FuncFormatter on the theta axis
Interactive plot where users pan or zoom Axis-level fixed or function locator and formatter, then verify after interaction
Changing where zero sits or the direction of increase set_theta_zero_location and set_theta_direction, separate from tick calls

Sources used for the signatures and behaviour above are the Matplotlib stable documentation: the PolarAxes page (version 3.11.1), the pyplot thetagrids page (version 3.11.0), and the ticker and polar demo pages (version 3.11.2). Behaviour can differ in other releases, so check the page for your installed version when a detail matters. The examples here illustrate the calls; they have not been run as part of this article.

Quick Recap

Bestseller No. 1
ForgeCore 10PCS Large Format Printer Sub Ink Tank Filter Compatible with Flora Zhongye Polar Plotter
ForgeCore 10PCS Large Format Printer Sub Ink Tank Filter Compatible with Flora Zhongye Polar Plotter
Helps clogs and in the ink delivery system extending the life of your printer components
$51.59
Bestseller No. 3
Bestseller No. 5
UcVdWkNEY Large Format Printer Sub Ink Tank Filter 10 Pack Compatible with Flora Zhongye Polar Plotter
UcVdWkNEY Large Format Printer Sub Ink Tank Filter 10 Pack Compatible with Flora Zhongye Polar Plotter
Filtration Role: Serves as a direct functional to maintain standard ink within the tank.
$45.34

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Windows Errors? Fix Them Before They SpreadFree repair scan
Outdated Drivers Are Slowing You DownFree scan - exact matches

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.