フィルターのクリア

How can I equally space a contour level

8 ビュー (過去 30 日間)
University Glasgow
University Glasgow 2023 年 3 月 19 日
コメント済み: John D'Errico 2023 年 3 月 19 日
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 件のコメント
University Glasgow
University Glasgow 2023 年 3 月 19 日
Thank you John and DGM for your response.
For instance, if I plot 10 contours between min(min(Dv1))/100000 and max(max(Dv1))/100000, I got the attached second figure.
I'm finding difficult to add equally-spaced contours above and below the solid red line that is planar to the x-axis. I don't know if it is possible to do that. If it is not possible, what possible way can one do this please?
John D'Errico
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 ExchangeContour Plots についてさらに検索

製品


リリース

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by