답변 (3개)

Kelly Kearney
Kelly Kearney 2013년 6월 20일

2 개 추천

The easiest way to do this is to interpolate your data to a higher resolution using an interpolation scheme that will result in smoother transitions between points, such as a spline.
[x,y,z] = peaks(10);
[xnew, ynew] = meshgrid(linspace(-3,3,100));
znew = interp2(x,y,z,xnew,ynew, 'spline');
subplot(2,1,1);
hold on;
scatter(x(:), y(:), [], z(:), 'filled');
contour(x,y,z, -6:7);
subplot(2,1,2);
hold on;
scatter(x(:), y(:), [], z(:), 'filled');
contour(xnew, ynew, znew, -6:7);
Be careful with this, though, since it might introduce some artifacts. Even though it may not be as visually pleasing, the low-res, less-smooth version is a more accurate depiction of the underlying data.
Andrew Reibold
Andrew Reibold 2013년 6월 14일

0 개 추천

Is it something you can try "binning"?

댓글 수: 1

Sandy
Sandy 2013년 6월 17일
편집: Sandy 2013년 6월 17일
Well the data has already been binned (hist3()).

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

Image Analyst
Image Analyst 2013년 6월 20일

0 개 추천

Please post an image or screenshot. For example, one way could be to blur your image with conv2() or imfilter() before you call contour().

카테고리

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

질문:

2013년 6월 14일

댓글:

2017년 4월 3일

Community Treasure Hunt

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

Start Hunting!

Translated by