-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathplot_histogram_SOM.m
75 lines (65 loc) · 2.31 KB
/
plot_histogram_SOM.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
65
66
67
68
69
70
71
72
73
74
75
function plot_histogram_SOM ( procdata, params, TraParams )
% Plot the histogram with all input and target points used in training
% by: A. Palacz @ DTU-Aqua
% last modified: 12 November 2012
%% Number of rows in inputs and targets
sInp = size ( procdata.Inputs , 2 ) ;
sTar = size ( procdata.Targets, 2 ) ;
%% Figure 1
figure('color','w',...
'Units','pixels',...
'PaperType','A4',...
'Position',[50 50 1500 900],...
'Visible','on');
for i = 1:sInp;
subplot(4,sInp,i)
hist(procdata.Inputs(:,i),50)
title(params.Inputs.InpsNames{i});
subplot(4,sInp,sInp+i)
hist(10.^(procdata.Inputs(:,i)),50)
h = findobj(gca,'Type','patch');
set(h,'FaceColor','r','EdgeColor','r')
subplot(4,sInp,2*sInp+i)
hist(mapminmax(procdata.Inputs(:,i)'),50)
subplot(4,sInp,3*sInp+i)
hist(mapminmax(10.^(procdata.Inputs(:,i))'),50)
h = findobj(gca,'Type','patch');
set(h,'FaceColor','r','EdgeColor','r')
end
%
% filename1 = [TraParams.OutDir,TraParams.Geo.Basin,'-Histogram_Inputs'];
%
% saveas(gcf,[filename1,'.fig'],'fig');
% set(gcf, 'PaperPositionMode', 'auto');
% print ('-depsc2','-r300',[filename1,'.eps']);
% fixPSlinestyle([filename1,'.eps'],[filename1,'.eps']);
% print ('-dtiff',[filename1,'.tiff']);
%% Figure 2
figure('color','w',...
'Units','pixels',...
'PaperType','A4',...
'Position',[50 50 1500 900],...
'Visible','on');
for i = 1:sTar;
subplot(4,sTar,i)
hist(procdata.Targets(:,i),50)
title(params.Targets.TarsNames{i});
subplot(4,sTar,sTar+i)
hist(10.^(procdata.Targets(:,i)),50)
h = findobj(gca,'Type','patch');
set(h,'FaceColor','r','EdgeColor','r')
subplot(4,sTar,2*sTar+i)
hist(mapminmax(procdata.Targets(:,i)'),50)
subplot(4,sTar,3*sTar+i)
hist(mapminmax(10.^(procdata.Targets(:,i))'),50)
h = findobj(gca,'Type','patch');
set(h,'FaceColor','r','EdgeColor','r')
end
% filename2 = [TraParams.OutDir,TraParams.Geo.Basin,'-Histogram_Targets'];
%
% saveas(gcf,[filename2,'.fig'],'fig');
% set(gcf, 'PaperPositionMode', 'auto');
% print ('-depsc2','-r300',[filename2,'.eps']);
% fixPSlinestyle([filename2,'.eps'],[filename2,'.eps']);
% print ('-dtiff',[filename2,'.tiff']);
end