forked from alandefreitas/matplotplusplus
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgeoscatter_2.cpp
More file actions
26 lines (20 loc) · 753 Bytes
/
geoscatter_2.cpp
File metadata and controls
26 lines (20 loc) · 753 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#include <cmath>
#include <matplot/matplot.h>
int main() {
using namespace matplot;
std::vector<double> lon = iota(-170, 10, 170);
std::vector<double> lat =
transform(lon, [](double lon) { return 50. * cosd(3 * lon); });
std::vector<double> A = transform(
lon, [](double lon) { return (101. + 100 * (sind(2 * lon))) / 7; });
std::vector<double> C =
transform(lon, [](double lon) { return cosd(4 * lon); });
geoscatter(lat, lon, A, C)
->marker_style(line_spec::marker_style::upward_pointing_triangle);
color_array terrain = {0., 0.71, 0.65, 0.59};
geoplot()->color(terrain);
color_array blue_water = {0., 0.4, 0.61, 0.76};
gca()->color(blue_water);
show();
return 0;
}