-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathtest_worldmaps.m
64 lines (56 loc) · 1.57 KB
/
test_worldmaps.m
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
worldmaps()
function worldmaps()
disp('TESTING interaction with Mapping Toolbox [preset_palette]')
colorlab.enter
close all
clear
% build the worldmap
topographer()
% preselect the colorscheme.
preset_palette(@palette.viridis);
% apply the preselected colormap
colorizer('viridis')
% build the worldmap
topographer()
% preselect the colorscheme.
preset_palette(@palette.cubehelix,3,-0.5,1.5,1 );
% apply the preselected colormap
colorizer('cubehelix')
% build the worldmap
topographer()
% preselect the colorscheme.
preset_palette(@palette.brewer,'-PuOr');
% apply the preselected colormap
colorizer('-PuOr')
% build the worldmap
topographer()
% preselect the colorscheme.
preset_palette(@palette.cmocean,'topo');
% apply the preselected colormap
colorizer('topo')
% build the worldmap
topographer()
% preselect the colorscheme.
preset_palette(@palette.crameri,'oleron');
% apply the preselected colormap
colorizer('oleron')
disp('>> All good!')
disp('------------')
end
function topographer()
load topo
load coastlines
figure()
disp('Worldmap building...')
worldmap(topo, topolegend);
contourfm(topo, topolegend);
disp('Worldmap inking...')
plotm(coastlat, coastlon, 'k');
disp('Worldmap painting...')
end
function colorizer(name)
disp(name)
contourcmap('preset_palette', 'Colorbar','on', 'Location','horizontal',...
'TitleString','Contour Intervals in Meters'); pause(0.5)
disp('...done!')
end