Subversion Repositories lagranto.um

Rev

Rev 3 | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 3 Rev 10
1
% ----------------------------------------------------------------------
1
% ----------------------------------------------------------------------
2
% Plot a set of trajectories
2
% Plot a set of trajectories
3
% ----------------------------------------------------------------------
3
% ----------------------------------------------------------------------
4
 
4
 
5
% First image (otherwise first image is not correctly written)
5
% First image (otherwise first image is not correctly written)
6
filename = 'test.eps';
6
filename = 'test.eps';
7
close;
7
close;
8
fh=figure('Units','pixels','Position',[100 100 900 900])
8
fh=figure('Units','pixels','Position',[100 100 900 900])
9
set(gcf, 'PaperPosition', [2 1 15 10]);
9
set(gcf, 'PaperPosition', [2 1 15 10]);
10
print('-depsc2','-r0',filename);
10
print('-depsc2','-r0',filename);
11
 
11
 
12
% Read the trajectory file
12
% Read the trajectory file
13
tra = read_trajectory('trajectory.lsl');
13
tra = read_trajectory('trajectory.lsl');
14
 
14
 
15
% Open a new figure and set the geographical projection and region
15
% Open a new figure and set the geographical projection and region
16
figure(1);
16
figure(1);
17
clf;
17
clf;
18
load coast
18
load coast
19
h=axesm('MapProjection','stereo','origin',[ 90 70 ]);
19
h=axesm('MapProjection','stereo','origin',[ 90 70 ]);
20
gridm;
20
gridm;
21
h=plotm(lat,long,'Color','k','LineWidth',1.5)
21
h=plotm(lat,long,'Color','k','LineWidth',1.5)
22
%axis([-1.5 1.5 -2 0]);
22
%axis([-1.5 1.5 -2 0]);
23
 
23
 
24
% Select a set of trajectories
24
% Select a set of trajectories
25
tra.select = (tra.lon > 6) & (tra.lon < 10) & (tra.lat > 44) & (tra.lat < 49) & (tra.time == 0);
25
tra.select = (tra.lon > 6) & (tra.lon < 10) & (tra.lat > 44) & (tra.lat < 49) & (tra.time == 0);
26
tra.select = tra.label(tra.select);
26
tra.select = tra.label(tra.select);
27
 
27
 
28
 
28
 
29
% Plot the trajectories
29
% Plot the trajectories
30
col.shift       = 47;
30
col.shift       = 47;
31
col.name        = [ pwd '/col_table.txt' ];
31
col.name        = [ pwd '/col_table.txt' ];
32
col.spacing     = 900:-50:200;
32
col.spacing     = 900:-50:200;
33
col.field       = 'p';
33
col.field       = 'p';
34
col.orientation = 'vert';
34
col.orientation = 'vert';
35
plot_trajectory(tra,col,[0 -48 -96]);
35
plot_trajectory(tra,col,[0 -48 -96]);
36
 
36
 
37
% Save figure
37
% Save figure
38
filename =   'trajectory.eps';
38
filename =   'trajectory.eps';
39
set(gcf, 'PaperPosition', [2 1 15 10]);
39
set(gcf, 'PaperPosition', [2 1 15 10]);
40
print('-depsc2','-r0',filename);
40
print('-depsc2','-r0',filename);