How can I draw three two dimensional plots on a three dimensional plot?

조회 수: 3 (최근 30일)
Luis Cortes Herrera
Luis Cortes Herrera 2014년 7월 19일
답변: Aurele Turnes 2014년 8월 4일
I have data as a set of points in three dimensional space which I normally visualize either with the scatter3 command or building three two dimensional scatter plots with the projection of the position of each point in each {x,y,z}=constant plane. However, I am working on a poster and I think it would be nice to show this last triad of two dimensional plots using something similar to slices in each plane that delimit the first octant of my three dimensional variable space.
Is this possible? I am aware I can use slices to show scalar fields in a volume, but can I use them to covney the information in a scatter3 plot? If not, is there a general method I could use to build a three dimensional octant out of three two dimensional (scatter) plots? Thanks.

답변 (1개)

Aurele Turnes
Aurele Turnes 2014년 8월 4일
What do you mean by delimiting the first octant? Do you want only positive x, y, and z values on your final plot?
Also, what do you do exactly when you project your data? Do you plot the (y,z) values on the plane corresponding to x=0? Or do you plot the (y,z) values that correspond to a certain value of x=cst?
In the example code below, I am plotting the data points (y,z), (x,z) and (x,y) on each plane defined by x = min(x), y=min(y) and z=min(z) respectively.
figure;
hold on;
scatter3(x,y,zeros(length(z),1)+min(z));
scatter3(x,zeros(length(y),1)+min(y),z);
scatter3(zeros(length(x),1)+min(x),y,z);
Does this seem like what you are trying to accomplish?

카테고리

Help CenterFile Exchange에서 Surface and Mesh Plots에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by