How can I plot multiple 2D contour plots on a single 3D plot?
조회 수: 15 (최근 30일)
이전 댓글 표시
I have a number of 2D contour plots, and I need to represent them on one single 3D plot at various Z axis intervals. Also, the X and Y boundaries of each contour plot are different in some cases.
This is the best example I could find:
Unfortunately there isn't anything like it in the plot gallery.
How do I do this?
Thanks!
Edit: Included the example in the original question.
댓글 수: 1
Image Analyst
2013년 6월 1일
편집: Image Analyst
2013년 6월 1일
Can you give a link with an example of what visualization you're trying to achieve? Maybe something in Plot Gallery: http://www.mathworks.com/discovery/gallery.html
답변 (2개)
Youssef Khmou
2013년 6월 1일
편집: Youssef Khmou
2013년 6월 1일
You can use surf function as this example :
[x,y]=meshgrid(-1:0.1:1);
z=cos(x)+sin(y);
figure,surfc(x,y,z);
댓글 수: 5
Youssef Khmou
2013년 6월 2일
ok you can try to use the surf command :
[x,y]=meshgrid(-1:0.1:1);
contour=rand(size(x));
z=exp(-x.^2-y.^2);
surf(x,y,z,contour);
The contour now is placed according to the 3D object .
Athiya Sulthana
2015년 9월 25일
As you mentioned....Making the contour maps themselves 3D is no problem.....how did you get that... it would be great if you can share it.
Kres Nielsen
2021년 5월 21일
편집: Kres Nielsen
2021년 5월 21일
I believe contourslice is the solution here.
댓글 수: 0
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!