3D plot represented in 2D

5 次查看(过去 30 天)
Mariia Arseenko
Mariia Arseenko 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