-
-
Notifications
You must be signed in to change notification settings - Fork 67
/
Copy path2015-07-11-canadian-cities.html
executable file
·71 lines (68 loc) · 1.63 KB
/
2015-07-11-canadian-cities.html
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
---
name: Canadian Cities Map
language: plotly_js
suite: scatter-plots-on-maps
order: 1
sitemap: false
arrangement: horizontal
---
var data = [{
type: 'scattergeo',
mode: 'markers+text',
text: [
'Montreal', 'Toronto', 'Vancouver', 'Calgary', 'Edmonton',
'Ottawa', 'Halifax', 'Victoria', 'Winnepeg', 'Regina'
],
lon: [
-73.57, -79.24, -123.06, -114.1, -113.28,
-75.43, -63.57, -123.21, -97.13, -104.6
],
lat: [
45.5, 43.4, 49.13, 51.1, 53.34, 45.24,
44.64, 48.25, 49.89, 50.45
],
marker: {
size: 7,
color: [
'#bebada', '#fdb462', '#fb8072', '#d9d9d9', '#bc80bd',
'#b3de69', '#8dd3c7', '#80b1d3', '#fccde5', '#ffffb3'
],
line: {
width: 1
}
},
name: 'Canadian cities',
textposition: [
'top right', 'top left', 'top center', 'bottom right', 'top right',
'top left', 'bottom right', 'bottom left', 'top right', 'top right'
],
}];
var layout = {
title: {
text: 'Canadian cities',
font: {
family: 'Droid Serif, serif',
size: 16
}
},
geo: {
scope: 'north america',
resolution: 50,
lonaxis: {
'range': [-130, -55]
},
lataxis: {
'range': [40, 70]
},
showrivers: true,
rivercolor: '#fff',
showlakes: true,
lakecolor: '#fff',
showland: true,
landcolor: '#EAEAAE',
countrycolor: '#d3d3d3',
countrywidth: 1.5,
subunitcolor: '#d3d3d3'
}
};
Plotly.newPlot('myDiv', data, layout);