how to plot the shadow in a 3D plot (plot3)

27 ビュー (過去 30 日間)
Lukas
Lukas 2014 年 4 月 15 日
回答済み: Shaarif Zia 2014 年 8 月 4 日
Hello,
I want to plot a shadow of some Values in the x-z plane x-y and y-z plane e.g.
A=rand(1,10);
B=rand(1,10);
C=rand(1,10);
figure
plot3(A,B,C,'x');hold on
plot(A,B,'x','Color',[.5 .5 .5]) % plot a shadow in the x-y plane
xlabel('A')
ylabel('B')
zlabel('C')
grid on
How should I plot the shadows in the x-z and y-z plane, I tried the function shadowplot but this doesnt work.
Thanks
Lukas Dannhardt

回答 (1 件)

Shaarif Zia
Shaarif Zia 2014 年 8 月 4 日
You can simply plot the shadow points using plot3 and making one of the axes as zeroes.
For example:
plot3(A,B,zeros(size(C)),'s','color',[0.8 0.8 0.8]);
plot3(zeros(size(A)),B,C,'+','color',[0.8 0.8 0.8]);
plot3(A,zeros(size(B)),C,'o','color',[0.8 0.8 0.8]);
The Plot might not look good. You can verify the plot by seeing the plot in each axis view.
Hope this helps.

カテゴリ

Help Center および File ExchangeSurface and Mesh Plots についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by