RunMat
  • Pricing
RunMat
GitHub
GitHub
DownloadSign InTry in Browser
DesktopRuntimeServer
RunMat

Run math blazing fast

GitHubX (Twitter)LinkedIn

Company

  • About
  • Pricing
  • Contact

Explore

  • RunMat for academia
  • RunMat vs MATLAB Online
  • Benchmarks

Get product updates and release notes from the RunMat team.

© 2026 Dystr · Made withfor the scientific community.

RunMat™ is a registered trademark of Dystr, Inc. MATLAB® is a registered trademark of The MathWorks, Inc. RunMat is not affiliated with, endorsed by, or sponsored by The MathWorks, Inc.

LicensePrivacy
/
See all docs
Builtin Reference
    • addpoints
    • ancestor
    • animatedline
    • area
    • axes
    • axis
    • bar
    • barh
    • box
    • caxis
    • cla
    • clf
    • clim
    • colorbar
    • colorcube
    • colormap
    • colororder
    • contour
    • contour3
    • contourf
    • copyobj
    • daspect
    • datacursormode
    • dataTipTextRow
    • errorbar
    • fcontour
    • figure
    • fill
    • fill3
    • findobj
    • fsurf
    • gca
    • gcf
    • get
    • gobjects
    • grid
    • groot
    • heatmap
    • hgload
    • hgsave
    • hidden
    • hist
    • histogram
    • histogram2
    • hold
    • image
    • imagesc
    • imshow
    • legend
    • line
    • linkaxes
    • loglog
    • mesh
    • meshc
    • openfig
    • opengl
    • pan
    • parula
    • patch
    • pie
    • plot
    • plot3
    • plotmatrix
    • plotyy
    • polarhistogram
    • polarplot
    • polarscatter
    • print
    • quiver
    • quiver3
    • ribbon
    • saveas
    • savefig
    • scatter
    • scatter3
    • semilogx
    • semilogy
    • set
    • sgtitle
    • shading
    • sphere
    • stackedplot
    • stairs
    • stem
    • subplot
    • subtitle
    • suptitle
    • surf
    • surfc
    • text
    • textscatter
    • textscatter3
    • title
    • triplot
    • view
    • waitbar
    • wordcloud
    • xlabel
    • xlim
    • xline
    • xscale
    • xtickangle
    • xtickformat
    • xticklabels
    • xticks
    • ylabel
    • ylim
    • yline
    • yscale
    • ytickangle
    • ytickformat
    • yticklabels
    • yticks
    • zlabel
    • zlim
    • zoom

polarplot — Create 2-D line plots in polar coordinates.

polarplot converts angular/radial data to cartesian line coordinates and marks the active axes as polar so the renderer draws concentric radial rings and angular spokes.

Syntax

h = polarplot(theta, rho)
h = polarplot(theta, rho, LineSpec)
h = polarplot(theta1, rho1, ..., thetaN, rhoN)
h = polarplot(rho)
h = polarplot(Z)

Inputs

NameTypeRequiredDefaultDescription
thetaNumericArrayYes—Angular coordinates in radians.
rhoNumericArrayYes—Radial coordinates.
argsAnyVariadic—Polar plot inputs with optional axes handle, LineSpec, and Name/Value pairs.
rhoOrZNumericArrayYes—Radial data with implicit theta, or complex data interpreted as angle/abs.

Returns

NameTypeDescription
hNumericScalarHandle to the first polar line object.

Errors

IdentifierWhenMessage
RunMat:polarplot:InvalidArgumentInput data, series grammar, axes targeting, or style arguments are invalid.polarplot: invalid argument
RunMat:polarplot:InternalInternal polar line construction or rendering fails unexpectedly.polarplot: internal operation failed

How polarplot works

  • Real integer coordinates are accepted before the explicit floating geometry boundary; complex integer Z data is a separately gated RunMat-mode extension that must be exactly representable before rendering.
  • polarplot(theta, rho) interprets theta values as radians and requires theta and rho to have the same number of elements.
  • polarplot(rho) creates implicit theta values over [0, 2*pi] with the same number of samples as rho.
  • polarplot(Z) interprets complex input as theta = angle(Z) and rho = abs(Z).
  • Matrix rho or Z inputs create one polar line per column. A vector theta can be paired with a rho matrix when its length matches each column.
  • Multiple theta/rho pairs in one call create multiple line objects and return the handle for the first created series.
  • LineSpec strings and common line name/value pairs such as LineWidth, Color, Marker, and DisplayName share the same parser used by plot. A final all-name/value group applies to every line created by that call.
  • Empty data creates an empty line object, matching MATLAB graphics-object behavior.
  • The target axes are switched to polar mode with equal x/y scaling and symmetric cartesian limits based on the largest radius.

Options

  • Use MATLAB-style line specs such as 'r--', 'bo-', and ':' after a polar series.
  • Use hold on before additional polarplot calls to overlay more polar lines on the same axes.
  • Use set(h, ...) on the returned line handle to update line properties after plotting.

Examples

Plot a polar curve from theta and rho

theta = linspace(0, 2*pi, 200);
rho = abs(sin(2*theta).*cos(2*theta));
h = polarplot(theta, rho);

Expected output:

% h is a numeric handle for the first polar line

Use complex data

z = exp(1i*linspace(0, 2*pi, 100));
polarplot(z, 'r--');

Expected output:

% theta comes from angle(z), rho comes from abs(z)

Overlay multiple polar series

theta = linspace(0, 2*pi, 200);
polarplot(theta, abs(sin(theta)), 'b-');
hold on;
polarplot(theta, abs(cos(theta)), 'r--', 'LineWidth', 2);

Expected output:

% both lines share the same polar axes

Rendered polarplot example

theta = linspace(0, 2*pi, 500);
primary = abs(cos(theta)).^3 + 0.12;
secondary = 0.55*abs(sin(2*theta)).^2 + 0.08;

polarplot(theta, primary, 'b-');
hold on;
polarplot(theta, secondary, 'r--', 'LineWidth', 2);
hold off;
Expected output:
Directional gain response rendered as two MATLAB polarplot series in RunMat

Compare this result with other chart types in the MATLAB Plot Gallery.

Using polarplot with coding agents

Open a RunMat example with live inputs, then ask the agent to explain how polarplot changes the result.

Run a small polarplot example, explain the result, then change one input and compare the output.

FAQ

Does polarplot store polar data internally?⌄

The line object stores cartesian x/y coordinates after conversion. The axes metadata records that the axes are polar, which controls grid rendering and equal aspect behavior.

Are advanced MATLAB polar axes properties supported?⌄

The initial implementation supports the common plotting forms, line styles, and polar grid rendering. Advanced axes properties such as ThetaLim, RLim, ThetaDir, and ThetaZeroLocation are not yet separate builtins/properties.

Related Plotting functions

2D Charts

area · bar · errorbar · heatmap · hist · histogram · loglog · pie · plot · scatter · semilogx · semilogy · stairs · stem

3D & Surface

contour · contour3 · contourf · mesh · meshc · plot3 · quiver · scatter3 · surf · surfc

Images

image · imagesc · imshow

Axes & Layout

axis · box · grid · sgtitle · subplot · title · view · zlabel

Appearance

colorbar · colormap · legend · shading

Handle Access

gca · gcf · get · set

Other

addpoints · ancestor · animatedline · axes · barh · caxis · cla · clf · clim · colorcube · colororder · copyobj · daspect · datacursormode · dataTipTextRow · fcontour · figure · fill · fill3 · findobj · fsurf · gobjects · groot · hgload · hgsave · hidden · histogram2 · hold · line · linkaxes · openfig · opengl · pan · parula · patch · plotmatrix · plotyy · polarhistogram · polarscatter · print · quiver3 · ribbon · saveas · savefig · sphere · stackedplot · subtitle · suptitle · text · textscatter · textscatter3 · triplot · waitbar · wordcloud · xlabel · xlim · xline · xscale · xtickangle · xtickformat · xticklabels · xticks · ylabel · ylim · yline · yscale · ytickangle · ytickformat · yticklabels · yticks · zlim · zoom

About RunMat

RunMat is an open-source runtime that executes MATLAB-syntax code blazing on any GPU. It is licensed under the Apache 2.0 license.

  • RunMat automatically optimizes your math for GPU execution on Apple, Nvidia, and AMD hardware. No code changes needed. Simulations that took hours now take minutes.
  • Start running code in seconds. RunMat runs in the browser, on the desktop, or from the CLI. No license server, no IT ticket.

Getting started · Benchmarks · Pricing

Download RunMat

Download RunMat for full performance, or use RunMat in your browser for zero setup.

Download RunMatOpen Sandbox
On this page
  • Syntax
  • Inputs
  • Returns
  • Errors
  • How polarplot works
  • Options
  • Examples
  • Plot a polar curve from theta and rho
  • Use complex data
  • Overlay multiple polar series
  • Rendered polarplot example
  • Using polarplot with coding agents
  • FAQ
  • Related Plotting functions
  • 2D Charts
  • 3D & Surface
  • Images
  • Axes & Layout
  • Appearance
  • Handle Access
  • Other
  • About RunMat