Skip to main content
100%

Polar plot

✓ Published0🌍 Public
FFrissAnalytics
Last edited Sep 19, 2018
Created on Sep 19, 2018

This polar plot visualizes the parametric function sin(2t)cos(2t) as a red line on a circular grid. The plot uses a custom angular orientation, proceeding counterclockwise from 3 o'clock, which differs from D3's default clockwise radial direction starting at 12 o'clock. The code leverages `d3.svg.line.radial` to draw the line, with a linear scale mapping data values to radii. It also constructs radial and angular axes using SVG groups, circles, and lines, with a dashed style for the grid.

AI-generated description

This example demonstrates the construction of a polar plot of a parametric function, sin(2t)cos(2t). A d3.svg.line.radial is used to draw the red line. Note the definition of the line’s angle: D3’s radial lines and areas proceed clockwise starting at 12 o’clock, while this plot proceeds counterclockwise starting at 3 o’clock!

forked from <a href='http://bl.ocks.org/mbostock/'>mbostock</a>'s block: <a href='http://bl.ocks.org/mbostock/4583749'>Polar Plot</a>

gpl-3.0 Licensed

Similar vizzes