フィルターのクリア

Staked 3D line chart

3 ビュー (過去 30 日間)
Hussein
Hussein 2023 年 8 月 3 日
コメント済み: Star Strider 2023 年 8 月 3 日
Dear All,
Would you please support me to plot Staked 3D line chart like below in mATLAB?
Regards

採用された回答

Star Strider
Star Strider 2023 年 8 月 3 日
編集済み: Star Strider 2023 年 8 月 3 日
Perhaps something like this —
x = linspace(-40, 0, 20).';
zv = linspace(2, 4.5, 4);
z = repmat(zv,1,3).*exp(0.1*x) + rand(numel(x),12)/2.5;
xm = repmat(x,1,4);
ym = repmat(ones(size(x)),1,4);
zm = reshape(z,20,4,[]);
figure
hold on
for k = 1:size(zm,3)
plot3(xm,ym*(k-1),zm(:,:,k), 'o-k')
end
hold off
grid on
view(220,30)
yticks([0 1 2])
yticklabels({'One','Two','Three'})
xlabel('Temp °C')
ylabel('Refrigirant')
zlabel('CCP')
EDIT — (3 Aug 2023 at 11:03)
Tweaked code to give a more visually pleasing result. Otherwise unchanged
.
  2 件のコメント
Hussein
Hussein 2023 年 8 月 3 日
編集済み: Hussein 2023 年 8 月 3 日
Many Thanks, I'll try it.
Star Strider
Star Strider 2023 年 8 月 3 日
My pleasure!
It would be easier with your data. You will need to change the sizes of ‘xm’ and ‘ym’ to have the same dimensions as your data (‘zm’), however that should not be difficult.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeData Import from MATLAB についてさらに検索

製品


リリース

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by