필터 지우기
필터 지우기

Multilevel contour plots

조회 수: 3 (최근 30일)
Joe
Joe 2011년 7월 13일
Basically what I want to do is:
I have created three sets of data and have contour plots for them. Now all I want to do is display them all, at the same time, at different Z locations. Imagine you know the contour of some value for three different floors of a building and you just want to display all of them at the same time with space between them.
I feel like this should be pretty simple but I am having trouble finding a solution.

답변 (1개)

Rick Rosson
Rick Rosson 2011년 7월 13일
The following code shows how to create a contour plot at 3 different locations other than the Z=0 plane:
N = 20;
L = 3;
A = zeros(N,N,L);
for k = 1:L
A(:,:,k) = peaks(N);
h = surfc(A(:,:,k));
hold on;
set(h(1),'visible','off');
for i = 2:length(h);
newz = get(h(i),'Zdata') + 5*k;
set(h(i),'Zdata',newz)
end
end
For more information:
docsearch('"Changing the Offset of a Contour"');
HTH.

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by