Creating multiple Line plot
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Jonathan Asante
el 27 de Mzo. de 2018
Comentada: Star Strider
el 28 de Mzo. de 2018
I've got a 5 x 6 matrix and would like to create multiple line plots using the first 1 column as x-axis and 2 column as y-axis and the other four as the values of z on the graph. Any help will be appreciated.
1 0 10 15 0 15
2 0.5 10 10 0 20
3 0.6 6 24 0 11
4 0.8 0 29 0 11
5 3 0 19 11 10
0 comentarios
Respuesta aceptada
Star Strider
el 27 de Mzo. de 2018
Try this:
A = [1 0 10 15 0 15
2 0.5 10 10 0 20
3 0.6 6 24 0 11
4 0.8 0 29 0 11
5 3 0 19 11 10];
AxesH = axes('NextPlot', 'add');
figure(1)
for k1 = 1:4
plot3(A(:,1), A(:,2), A(:,k1+2))
end
grid on
view(-60, 30)
Experiment with the view function arguments to get the result you want.
2 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre 2-D and 3-D Plots en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!