forked from cultpenguin/mGstat
-
Notifications
You must be signed in to change notification settings - Fork 0
/
visim_plot_sim.m
53 lines (45 loc) · 1.4 KB
/
visim_plot_sim.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
% visim_plot_sim : plots VISIM simulations
%
% V=visim_plot_sim(V,isim,cax,FS,nxsub,nysub)
%
% V: VISIM structure
% isim (optional): realization numbers to plot: def:isim=1:1:V.nsim;
% cax (optional): Coloraxis, def:cax=[min(V.out.data) max(V.out.data)];
% FS (optional): Fontsize, def:FS=6;
% nxsub (optional): number of subplot i X direction
% nzyub (optional): number of subplot i Y direction
%
function V=visim_plot_sim(V,isim,cax,FS,nxsub,nysub)
if isstruct(V)~=1, V=read_visim(V); end
if nargin<2, isim=1:1:V.nsim; end
if isempty(isim), isim=1:1:V.nsim; end
nsim=length(isim);
if nargin<3, cax=[min(V.D(:)) max(V.D(:))]; end
if nargin<4, FS=6; end
if isempty(FS), FS=6; end
if nargin<5
dyx=V.ny/V.nx;
nxsub=max([1 floor(sqrt(nsim*dyx))]);
end
if nargin<6
nysub=ceil(nsim/nxsub);
end
j=0;
for i=1:nsim;
j=j+1;
% for i=1:min(nsim,(nxsub*nysub));
subplot(nysub,nxsub,i)
imagesc(V.x,V.y,V.D(:,:,isim(j))');
% title(sprintf('#%d',i),'FontSize',FS+2);
xlabel('Distance (m)','FontSize',FS);
if i==1;ylabel('Depth (m)','FontSize',FS);;end
caxis(cax);
set(gca,'FontSize',FS)
set(gca,'XAxisLocation','top')
axis image
%title(sprintf('i=%03d',isim(j)))
end
%set(gca,'visible','off'); colorbar; cla
%[f1,f2,f3]=fileparts(V.parfile);
%title([f2,' Realizations'],'interpr','none')
%print_mul(sprintf('%s_sim',f2))