Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help


ax_polar (expr, [var, min, max]) — Function

Plot r(θ) curves in polar coordinates as interactive Plotly.js charts. Standalone function (like ax_plot2d).

Calling forms:

  • ax_polar(expr, [θ, min, max], options) — single expression
  • ax_polar([expr_1, ..., expr_n], [θ, min, max], options) — multiple expressions

Examples

/* Cardioid */
ax_polar(1 + cos(θ), [θ, 0, 2*%pi])$

/* Rose curve */
ax_polar(sin(3*θ), [θ, 0, 2*%pi], color="red", title="Rose Curve")$

/* Multiple curves */
ax_polar(
  [1 + cos(θ), 1 - cos(θ)],
  [θ, 0, 2*%pi],
  title="Cardioids"
)$

/* Spiral */
ax_polar(θ/10, [θ, 0, 6*%pi], title="Archimedean Spiral")$

Style Options

OptionDefaultDescription
colorautoLine color
line_width2Line width in pixels
dash"solid"Line style: "solid", "dot", "dash", "dashdot"
nameautoLegend entry
opacity1.0Trace opacity
nticks500Sampling resolution

Layout Options

OptionDescription
titlePlot title
showlegendShow legend (true/false)
widthFixed plot width in pixels
heightFixed plot height in pixels

See also: ax_plot2d, ax_draw2d