Combining 3 2D graphs into a 3D figure

34 ビュー (過去 30 日間)
Edward Keavney
Edward Keavney 2021 年 10 月 21 日
コメント済み: Matt J 2021 年 10 月 21 日
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 日
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 日
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 件)

カテゴリ

Help Center および File Exchange2-D and 3-D Plots についてさらに検索

タグ

製品


リリース

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by