Plotting interpolated values as filled contours

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

DGM
DGM 2021년 8월 25일
It would help if you post the code instead of a picture of code.
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]');
okay, i got it. Just change the aray in v between the min and max.
Nice

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

도움말 센터File Exchange에서 Contour Plots에 대해 자세히 알아보기

제품

릴리스

R2017b

질문:

2021년 8월 25일

댓글:

2021년 8월 25일

Community Treasure Hunt

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

Start Hunting!

Translated by