Plotting several 2d plots on a 3d axis.
조회 수: 11 (최근 30일)
이전 댓글 표시
So I have a particular parameter which I'm interested in what happens for different values of it:
w = 0:0.1:1;
Then I compute a value, I, which changes over time for each particular value of w, i.e., I = I(n,t) where t is the index for the time and n is the index for the particular w value I want.
Now, I want to make a plot for how I changes for each variable, w and time. I have that size(w)=11 and size(time)=2001 so that I is a matrix of size 11x2001.
I've tried using surf but can't see much in it.
I would like to know how to create a 3D plot of individual 2D plots, so that it looks like graphs of I (in z), varying with time (in y) but then repeated for each distant value of w in a sort-of fake x-axis. Something like what's attached.


Any ideas? Thank you in advance!
댓글 수: 0
답변 (1개)
KSSV
2017년 6월 8일
N = 25 ;
[X,Y,Z] = peaks(N) ;
%%ribbon plot
ribbon(Y,Z) ;
figure
hold on
for i = 1:N
plot3(X(i,:),i+ones(N,1),Z(i,:))
end
view(3)
댓글 수: 0
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!