Plotting interpolated values as filled contours

6 次查看(过去 30 天)
Hi Ladys and Gends.
I've the task to plot interpolated values. As you can see in the pictures, one figure is working very well.
However two of these three dont.
I dont know why.
Also, here is my Code:
Maybe someone has an idea, how to adjust the code.
Best
Felix
  3 个评论
Felix Ja
Felix Ja 2021-8-25
xi=0:2:650; %aufspannen koordinatensystem
yi = 0:2:415;
figure(10);
x=log10(porosity);
y=3.0227*x-12.902;
[XI,YI] =meshgrid(xi,yi);
ZI = griddata(reservoir(:,1),reservoir(:,2),y,XI,YI, 'v4');
v = (min(y) : 0.2 : max(y));
[c,h] = contour(XI,YI,ZI);
clabel(c,h);
contourf(XI,YI,ZI,v);
set(colorbar,'yColor','b');
title('Interpolated scattered logarithmic permeability (entire domain)');
xlabel('x-coordinates [m]');
ylabel('y-coordinates [m]');
figure(11); %das funktioniert noch nicht richtig
[XI,YI] =meshgrid(xi,yi);
ZI = griddata(reservoir(:,1),reservoir(:,2),reservoir(:,3),XI,YI, 'v4');
v = min(reservoir(:,3)) : 2 : max(reservoir(:,3));
[c,h] = contour(XI,YI,ZI);
clabel(c,h);
contourf(XI,YI,ZI,v);
colorbar('Direction','reverse');
set(colorbar,'yColor','g');
title('Interpolated scattered porosity (entire domain)');
xlabel('x-coordinates [m]');
ylabel('y-coordinates [m]');
figure(12); %das glaube ich auch nicht
x2=porosity;
y2 = -1720.2091*x2 + (2548.5491); %ich weiß nicht, ob die density-Werte stimmen
[XI,YI] =meshgrid(xi,yi);
ZI = griddata(reservoir(:,1),reservoir(:,2),y2,XI,YI, 'v4');
v = min(reservoir(:,4)) : 0.2 : max(reservoir(:,4));
[c,h] = contour(XI,YI,ZI);
clabel(c,h);
contourf(XI,YI,ZI,v);
colorbar;
colorbar('Direction','reverse');
set(colorbar,'yColor','m')
lim = caxis;
caxis([00 2500]); %hier hab ich versucht die Colorbargrenzen zu versetzen aber das hat iwie nicht funktioniert
title('Interpolated scattered density (entire domain)');
xlabel('x-coordinates [m]');
ylabel('y-coordinates [m]');
Felix Ja
Felix Ja 2021-8-25
okay, i got it. Just change the aray in v between the min and max.
Nice

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Scatter Plots 的更多信息

产品


版本

R2017b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by