how to make the contour line more curvy

조회 수: 2 (최근 30일)
yuxuan
yuxuan 2024년 3월 10일
댓글: Mathieu NOE 2024년 4월 26일
The contour line is straight, how to make it more curvy? I have uploaded the image i and raw data.
  댓글 수: 2
DGM
DGM 2024년 3월 10일
It's not clear how your data is arranged or whether this is even the same data or all that's required to plot it. There's only one 63x189 matrix in the file.
Neither 63 nor 189 are integer-divisible by 12, so it's hard to guess whether this needs to be reshaped. It doesn't look like it does. So how did you plot this? If there's other information needed, please include it.
yuxuan
yuxuan 2024년 3월 11일
sorry, i have uploaded the wrong data. Here's the correct data.

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

답변 (1개)

VBBV
VBBV 2024년 3월 10일
편집: VBBV 2024년 3월 10일
xdata % your x data
ydata % your y data
zdata % your z data
v = min(min(zdata)):1:max(max(zdata)) % add finer step size for smoother /curvier lines
contourf(xdata,ydata,zdata,v) % use additional argument
  댓글 수: 3
VBBV
VBBV 2024년 3월 10일
편집: VBBV 2024년 3월 10일

From the figure attachment the data looked like it's sufficiently smoothed, but was plotted at a coarse step. Yes, if the data is coarsely spaced that option doesn't smooth as you told.

@yuxuan , you can try this function to make the lines more curvy given in this link.

https://www.mathworks.com/help/matlab/ref/smoothdata.html

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

카테고리

Help CenterFile Exchange에서 Contour Plots에 대해 자세히 알아보기

제품


릴리스

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by