how to plot the shadow in a 3D plot (plot3)
28 views (last 30 days)
Show older comments
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
0 Comments
Answers (1)
Shaarif Zia
on 4 Aug 2014
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.
0 Comments
See Also
Categories
Find more on Surface and Mesh Plots in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!