Zoom on multible figure at the same time
9 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
How to zoom in on all figure´s at the same time
1 comentario
Mathieu NOE
el 11 de Dic. de 2023
Editada: Mathieu NOE
el 11 de Dic. de 2023
either use xlim on all plots or this : Synchronize limits of multiple axes - MATLAB linkaxes - MathWorks France
Respuestas (1)
Pratyush Swain
el 11 de Dic. de 2023
Hi Steen,
I understand you want to zoom in on all figures at the same time. For this purpose, we have to link the axes of all the figures together and set common axes limits .
Please follow the example implementation for the same.
% Create the first figure and plot in it
fig1 = figure;
plot(1:10, rand(1,10)); % Example plot
ax1 = gca; % Get the axes of the first figure
% Create the second figure and plot in it
fig2 = figure;
plot(1:10, rand(1,10)); % Example plot
ax2 = gca; % Get the axes of the second figure
%Create the third figure and plot in it
fig3 = figure;
plot(1:10, rand(1,10)); % Example plot
ax3 = gca; % Get the axes of the third figure
% Create the fourth figure and plot in it
fig4 = figure;
plot(1:10, rand(1,10)); % Example plot
ax4 = gca; % Get the axes of the fourth figure
linkaxes([ax1, ax2 , ax3, ax4], 'xy'); % Link the x and y axes of all the axes
% Set common axes limits
xlim(ax1, [1,10]); % Set the x-axis limits
ylim(ax1, [0, 1]); % Set the y-axis limits
On replicating the example above on matlab, you will be able to zoom in all figures simultaneously.
For more information, please refer to documentation of 'linkaxes' function:
Hope this helps.
0 comentarios
Ver también
Categorías
Más información sobre Data Exploration 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!