-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathplot_probes.m
61 lines (52 loc) · 1.22 KB
/
plot_probes.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
% data: (probe, time)
% time: (time)
function plot_probes(time, data, deglist)
DOWNSAMPLE=1
if DOWNSAMPLE
time = time(1:25:end);
data = data(:, 1:25:end);
time = 1:length(time);
end
timesteps = size(data,2)
probes = size(data,1)
% [time, data]
% figure
max_stdev = max(std(data, 0, 1));
hold on
mag=40;
box on
for ii=1:probes
%plot(time, data(ii,:)./3.0+ii, 'k')
plot(time, data(ii,:)*mag+deglist(ii), 'k') %'Color', [.1, .1, .1])
end
% for t=1:timesteps
% vals = data(:,t);
% avg = mean(vals);
% stdev = std(vals);
% scatter(time(t)*ones(1,probes)', vals*mag + deglist' ,10*ones(1,probes)', abs(vals-avg)/stdev/1.96, 'filled');
% end
% c = colormap('hot');
% colormap( c(1:32, :))
hold off
if 1
%ylim([0 360]);
set(gca, 'YTickLabel', [])
else
offset = 0; %mean(data,2)*mag;
set(gca, 'YTick', deglist+offset')
if 1
set(gca, 'YTickLabel', deglist) %floor(linspace(0, 360, probes)))
else
set(gca, 'YTickLabel', [])
end
end
set(gca, 'FontSize', 20)
if DOWNSAMPLE
xlabel('Time step (Down-sampled)')
else
xlabel('Time step')
end
%set(gca, 'Color', [0 0 0])
ylabel('Normalized pressure offset by angle')
%saveas('pressure_probe_simulation.png')
end