f201ea95创建于 2022年9月17日历史提交

Geoscatter Plot

Examples

  1. Simple example of geoscatter plot.

::

let lon = linspace(-170.0, 170.0, num:35)
let lat = lon.apply({x: Float64 => 50.0 * cos(3.0 * x / 180.0 * PI64)})
let A = lon.apply({x: Float64 => (101.0 + 100.0 * sin(2.0 * x / 180.0 * PI64)) / 7.0})
let C = lon.apply({x: Float64 => cos(4.0 * x / 180.0 * PI64)})
geoscatter(lat, lon, A, C).marker(MarkerStyle.UpwardPointingTriangle)

Result:

.. image:: ../../../tests/imgs/geography/geoscatter1.png :align: center :width: 360

  1. Example of geoscatter plot with custom colors for land and sea.

::

let lon = linspace(-170.0, 170.0, num:35)
let lat = lon.apply({x: Float64 => 50.0 * cos(3.0 * x / 180.0 * PI64)})
let A = lon.apply({x: Float64 => (101.0 + 100.0 * sin(2.0 * x / 180.0 * PI64)) / 7.0})
let C = lon.apply({x: Float64 => cos(4.0 * x / 180.0 * PI64)})
geoscatter(lat, lon, A, C).marker(MarkerStyle.UpwardPointingTriangle)
geoplot().color(0.0, 0.71, 0.65, 0.59)
gca().color(0.0, 0.4, 0.61, 0.76)

Result:

.. image:: ../../../tests/imgs/geography/geoscatter2.png :align: center :width: 360