3D plot represented in 2D

조회 수: 6 (최근 30일)
Mariia Arseenko
Mariia Arseenko 2022년 1월 28일
댓글: Star Strider 2022년 1월 28일
Hello,
I am trying to find a way to make the results of my 3D plot more visible. I see two ways to do that: make a border to different datasets or to make z-axes values distribution as a bacground in 2D image of x and y? Do you have an idea how to do that?
Now I have this dataset, which gives points on 3D graph.
Thanks for your help.
x1 = [1.15 1.24 1.19];
y1 = [191.00 187.90 173.30];
z1 = [168.70 175.70 155.10];
scatter3(x1,y1,z1)
xlabel('e')
ylabel('S')
zlabel('Wf')
grid on
hold on
x2 = [1.18 1.35 1.34];
y2 = [207.20 210.40 188.80];
z2 = [183.60 201.90 184.60];
scatter3(x2,y2,z2)
xlabel('e')
ylabel('S')
zlabel('Wf')
grid on
hold on
x3 = [0.65 0.92 1.33];
y3 = [258.10 211.90 192.20];
z3 = [138.20 152.60 197.30];
scatter3(x3,y3,z3)
xlabel('e')
ylabel('S')
zlabel('Wf')
grid on
hold on
x3 = [0.65 0.92 1.33];
y3 = [258.10 211.90 192.20];
z3 = [138.20 152.60 197.30];
scatter3(x3,y3,z3)
xlabel('e')
ylabel('S')
zlabel('Wf')
grid on
hold on
x4 = [0.65 0.76 0.74];
y4 = [394.73 146.90 428.90];
z4 = [196.30 236.60 273.70];
scatter3(x4,y4,z4)
xlabel('e')
ylabel('S')
zlabel('Wf')
grid on
hold on
x5 = [0.59 0.98 1.25];
y5 = [327.90 309.10 363.00];
z5 = [156.40 221.70 317.30];
scatter3(x5,y5,z5)
xlabel('e')
ylabel('S')
zlabel('Wf')
grid on
hold on
x6 = [0.54 0.60 0.79];
y6 = [308.80 244.20 245.70];
z6 = [133.60 109.70 156.10];
scatter3(x6,y6,z6)
xlabel('e')
ylabel('S')
zlabel('Wf')
grid on
hold on

답변 (1개)

Cris LaPierre
Cris LaPierre 2022년 1월 28일
What about a stem3 plot?
x1 = [1.15 1.24 1.19];
y1 = [191.00 187.90 173.30];
z1 = [168.70 175.70 155.10];
stem3(x1,y1,z1)
xlabel('e')
ylabel('S')
zlabel('Wf')
grid on
hold on
x2 = [1.18 1.35 1.34];
y2 = [207.20 210.40 188.80];
z2 = [183.60 201.90 184.60];
stem3(x2,y2,z2)
x3 = [0.65 0.92 1.33];
y3 = [258.10 211.90 192.20];
z3 = [138.20 152.60 197.30];
stem3(x3,y3,z3)
x3 = [0.65 0.92 1.33];
y3 = [258.10 211.90 192.20];
z3 = [138.20 152.60 197.30];
stem3(x3,y3,z3)
x4 = [0.65 0.76 0.74];
y4 = [394.73 146.90 428.90];
z4 = [196.30 236.60 273.70];
stem3(x4,y4,z4)
x5 = [0.59 0.98 1.25];
y5 = [327.90 309.10 363.00];
z5 = [156.40 221.70 317.30];
stem3(x5,y5,z5)
x6 = [0.54 0.60 0.79];
y6 = [308.80 244.20 245.70];
z6 = [133.60 109.70 156.10];
stem3(x6,y6,z6)
hold off
  댓글 수: 4
Mariia Arseenko
Mariia Arseenko 2022년 1월 28일
That perfectly worked, thanks a lot!
Star Strider
Star Strider 2022년 1월 28일
@Mariia Arseenko — Accepting Cris’s Answer is the best way to express your thanks.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Mathematics에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by