Hi, I have some 3D velocity data and would like to be able to combine three plots with time on the X axis and velocity on the Y axis into one graph without using the subplot function - like the graph below, where in my instance, the Z axis would contain three labels, one each for the X, Y and Z component of the 3D velocity data. I'm already able of making the individual graphs, but I'm struggling to incooperate them into one graph like the one below.
Any help would be gratefully appreciated! Thanks!

 채택된 답변

Matt J
Matt J 2021년 10월 21일
편집: Matt J 2021년 10월 21일

0 개 추천

Something like the following, perhaps?
x=linspace(0,5);
z1=x.*exp(-x);
z2=3*x.*exp(-4*x);
Hax=axes;
area(x,z1,'Parent',upright(Hax,1));
area(x,z2,'Parent',upright(Hax,2));
xlabel X; ylabel Y; zlabel Z
ylim([0,3])
grid on;
view(-40,35)
function hg=upright(Hax,i)
hg=hgtransform('Parent',Hax,'Matrix',makehgtform('translate',[0,i,0],'xrotate',pi/2));
end

댓글 수: 4

Edward Keavney
Edward Keavney 2021년 10월 21일
Thanks for your help Matt!
I've had a quick attempt to run your script and it seems to be along the right lines of what I'm looking for.
I've included an image of what the individual graphs look like for the three different plots I originally made for the X, Y and Z data, with time on the X axis and velocity on the Y axis.
I'm struggling on understanding how I would incorperate my simple plot(X,Y) function into your script.
Any further help would be great!
Matt J
Matt J 2021년 10월 21일
편집: Matt J 2021년 10월 21일
These lines are the ones that plot the curves (x,z1) and (x,z2), so you would replace the (x,z) pairs with your own signal data. y1 and y2 are the locations along the y axis where you wish to place the respective curves.
area(x,z1,'Parent',upright(Hax,y1));
area(x,z2,'Parent',upright(Hax,y2));
Edward Keavney
Edward Keavney 2021년 10월 21일
This works absolutley perfectly, thanks for all your help! Very much appreciated.
Matt J
Matt J 2021년 10월 21일
You're welcome, but since it worked please Accept-click the answer.

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

추가 답변 (0개)

카테고리

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

제품

릴리스

R2019a

태그

질문:

2021년 10월 21일

댓글:

2021년 10월 21일

Community Treasure Hunt

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

Start Hunting!

Translated by