How can I equally space a contour level
조회 수: 7 (최근 30일)
이전 댓글 표시
Please can someone help with equally spacing a contour. I tried different approach but couldn't work. I have attached the data and the figure I got. I want the contour level above and below the second red line to be equally space. This is what I tried.
xi = linspace(-0.3, 0.3, 201);
u = linspace(0, 3, 201);
contourf(u, xi, Dv1(:, :)/100000, [min(min(Dv1))/100000:0.0002:-0.00006 0.0001:0.004:0.04, 0.001, 0.0016, 0.00055, 0.00069, 0.0002 0.0015:0.0004:0.0042 0.0043:0.0005:0.02 0.013 0.05:0.05:0.5 0.074 0.87 0.68 0.063 0.073, 1.35 1.75, 2.56 1.1:1:9 10:10:max(max(Dv1))/100000] );
a = colorbar;
Label = ylabel(a,'D_v','FontSize',12,'Rotation',90);
hColourbar.Label.Position(1) = 3;
hold on
[c,h]= contour(u,xi,M1,[-2,0,2], '-r');
xlabel('u')
ylabel('\xi (Pa)')
hold off
댓글 수: 5
John D'Errico
2023년 3월 19일
if is it not possible, then how would we tell you how to do something that is impossible? Irresistable force, please meet immovable object.
A region in the plane where there are no contours drawn means you have a region where the surface is nearly perfectly flat over that entire region. If the surface is truy perfectly flat, then there are NO contour lines that cross through that region. But if it changes by even the slightest amount, then in theory, you could draw a contour line. But in that area, the contour lines would have a tiny difference in z-value. If you allow contour to draw contours at constant, then you will have a problem.
Remember that a contour line is the set of all points such that z(x,y)==z0, thus some specified constant.
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Contour Plots에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!