smooth contour lines in a slice

17 ビュー (過去 30 日間)
Simona Gabrielli
Simona Gabrielli 2022 年 12 月 5 日
コメント済み: Simona Gabrielli 2023 年 1 月 9 日
Hello!
I'm creating slices of a volume and plotting also the contour lines using contourslice function. However, the lines are quite "angular", I would like to make them smoother. I've tried to use the function contourspline but as i see it works only for a 2d matrix while i have 3d matrix as an input for the model.
I've tried to use different interpolations but the contour lines are changing but still is not the result i was looking for.
Do you have any suggestion? maybe an option of contourslice that i haven't read about or another function that could help me with that.
Thanks
Part of the code, where Xx, Yy, Zz and model are 55x32x20, and mat_*_xs are 20x10.
slice1 = slice(ax1,Xx, Yy, Zz, model,mat_x_cs,mat_y_cs,mat_z_cs);
slice1.LineStyle = 'none';
shading interp
contours_slice=contourslice(ax1,Xx, Yy, Zz, model,mat_x_cs,mat_y_cs,mat_z_cs);
set(contours_slice,'EdgeColor','k')

回答 (1 件)

KSSV
KSSV 2022 年 12 月 5 日
REad about interp2, imresize
  1 件のコメント
Simona Gabrielli
Simona Gabrielli 2023 年 1 月 9 日
I've tried interp2, but it's not suitable for my data. I've obtained some improvements changing the size of the grid and the interpolation in the slices. Still not the best result but the improvement is clear.
Thanks anyway!

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeContour Plots についてさらに検索

タグ

製品


リリース

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by