Skip to main content

Module polar

Module polar 

Source
Expand description

Polar plot builder methods.

Provides a fluent builder API for configuring PolarArtist instances. Polar plots represent data in a polar coordinate system where each point is defined by an angle (theta, in radians) and a radial distance (r).

Two modes are supported:

  • Line mode (filled = false): draws a polyline connecting the data points in polar space.
  • Filled mode (filled = true): closes the polar path and fills it, producing a radar/area chart.

§Examples

ax.polar_plot(&theta, &r)?
    .color(Color::TAB_BLUE)
    .linewidth(2.0)
    .label("Wind speed");

ax.polar_fill(&theta, &r)?
    .color(Color::TAB_ORANGE)
    .alpha(0.3)
    .label("Coverage");