Plot several graphs with distance in Y-axis!
4 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
M G
el 12 de Sept. de 2013
Editada: the cyclist
el 8 de Jul. de 2022
Hi Matlab experts,
If we have matrix M with the size 20x100. I want to plot 20 rows (each row has 100 points) in one figure in a way that graphs do not overlap on each other. How can I plot them with distance from each others on Y-axis while preserving the scaling? Something similar to EEG.
Thanks for your help. Mehdi
0 comentarios
Respuesta aceptada
the cyclist
el 12 de Sept. de 2013
Editada: the cyclist
el 8 de Jul. de 2022
Here's one way:
% Create some data
M = 0.3*rand(20,100);
offset = 1; % Make this big enough to prevent overlap
offset_vector = (offset:offset:20*offset)';
M_plus_offset = bsxfun(@plus,M,offset_vector);
figure
plot(M_plus_offset')
1 comentario
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!