Debian Codegraph @

addons/geoplot/examples/swiss-langs.inp

raw
1 set verbose off
2 open switzerland.geojson -q --frompkg=geoplot
3 setinfo mainlang --coded
4
5 bundle opts = null
6
7 # Fully automatic
8 opts.title = "Swiss languages 1"
9 geoplot(mainlang, opts)
10
11 # With specified colors
12 strings mycolors = defarray("#E87E7E", "#9DA8E0", "#85E1C3", "#E1C385")
13 opts.title = "Swiss languages 2"
14 opts.palette = "mycolors"
15 geoplot(mainlang, opts)
16
17 # With specified colors and labels
18 opts.title = "Swiss languages 3"
19 strings zlabels = defarray("Deutsch", "Français", "Rumantsch", "Italiano")
20 opts.palette = "mycolors,zlabels"
21 geoplot(mainlang, opts)
22
23 # With automatic colors but specified labels
24 opts.title = "Swiss languages 4"
25 opts.palette = "auto,zlabels"
26 geoplot(mainlang, opts)