b12f778a创建于 2022年9月19日历史提交

Polar Scatter Plot

Examples

::

let theta = linspace(PI64/4.0, PI64*2.0, num:8)
let rho = vector([19.0, 6.0, 12.0, 18.0, 16.0, 11.0, 15.0, 15.0])
polarscatter(theta, rho)

Result:

.. image:: ../../../tests/imgs/polar_scatter/polarScatter_1.png :align: center :width: 360

::

let theta = linspace(0.0, 2.0 * PI64, num:20)
var m: Random = Random(0)
let rho = randn(m, 20, 0.0, 1.0)
let size = 10.0
polarscatter(theta, rho, size, line_spec: "filled")

Result:

.. image:: ../../../tests/imgs/polar_scatter/polarScatter_2.png :align: center :width: 360

::

let theta = linspace(PI64 / 4.0, 2.0 * PI64, num: 8)
let rho = linspace(10.0, 20.0, num:8)
let sz = linspace(10.0, 30.0, num:8)
let colors = vector<Float64>([1.0, 2.0, 1.0, 2.0, 1.0, 2.0, 1.0, 2.0])
polarscatter(theta, rho, sz, colors, line_spec: "filled")

Result:

.. image:: ../../../tests/imgs/polar_scatter/polarScatter_3.png :align: center :width: 360

::

let theta = linspace(0.0, 360.0, num:50)
let rho_deg = theta.apply({t => 0.0005 * t})
let rho_rad = rho_deg.apply({t => t * PI64 / 180.0})

polarscatter(theta, rho_rad)

Result:

.. image:: ../../../tests/imgs/polar_scatter/polarScatter_4.png :align: center :width: 360

::

let theta = linspace(PI64 / 6.0, 2.0 * PI64, num:12)
var m: Random = Random(0)
let rho = randn(m, 12, 0.0, 1.0)
let ps = polarscatter(theta, rho, line_spec:"filled")
ps.marker("square")
ps.marker_size(20.0)
ps.marker_color(0.5, 1.0, 0.0)

Result:

.. image:: ../../../tests/imgs/polar_scatter/polarScatter_5.png :align: center :width: 360