forked from alandefreitas/matplotplusplus
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgeoplot_4.cpp
More file actions
28 lines (22 loc) · 757 Bytes
/
geoplot_4.cpp
File metadata and controls
28 lines (22 loc) · 757 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
27
28
#include <cmath>
#include <matplot/matplot.h>
int main() {
using namespace matplot;
double lat_seattle = 47.62;
double lon_seattle = -122.33;
double lat_anchorage = 61.20;
double lon_anchorage = -149.9;
double lat_pt_barrow = 71.38;
double lon_pt_barrow = -156.47;
geoplot(std::vector{lat_seattle, lat_anchorage},
std::vector{lon_seattle, lon_anchorage}, "y-");
hold(on);
geoplot(std::vector{lat_seattle, lat_pt_barrow},
std::vector{lon_seattle, lon_pt_barrow}, "b:");
geolimits(44, 75, -170, -100);
text(lon_anchorage, lat_anchorage, "Anchorage");
text(lon_seattle, lat_seattle, "Seattle");
text(lon_pt_barrow, lat_pt_barrow, "Point Barrow");
show();
return 0;
}