Multiple plots - change x axes all at once once
11 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
0
I have multiple figures where most of it is parameter vs time and the rest are scatter plots. Each figure, may contain multiple plots (only the relevant points over the same time).
Id like to change the selected time and all the figures would update accordingly.
What is the best way to do it rather to regenerate all the plots from scratch?
PS: I am using R14 version (don't ask why....)
0 commentaires
Réponses (2)
Voss
le 28 Fév 2024
Déplacé(e) : Voss
le 28 Fév 2024
5 commentaires
Aquatris
le 29 Fév 2024
Modifié(e) : Aquatris
le 29 Fév 2024
There is no problem in using linkaxes with scatter plots
figure(1)
s(1) = subplot(1,2,1); scatter(1:10, rand(1,10)*120);
s(2) = subplot(1,2,2); scatter(5:10, rand(1,6)*200);
figure(2)
s(3) = subplot(1,4,1); scatter(3:9, rand(1,7)*500);
s(4) = subplot(1,4,2); scatter(14:20, rand(1,7)*32);
s(5) = subplot(1,4,3); scatter(1:7, rand(1,7)*100);
s(6) = subplot(1,4,4); scatter(-9:-3, rand(1,7)*-10);
linkaxes(s,"x")
xlim([-20 40])
Walter Roberson
le 28 Fév 2024
set(HANDLES_TO_CHANGE, {'XData'}, repmat({NEW_X_VALUES}, size(HANDLES_TO_CHANGE,1), 1));
5 commentaires
Voss
le 29 Fév 2024
linkaxes works for axes in different figures, at least when I tested it in R2022a before posting my answer. I'm not sure about R14. Are you saying that you tried to use linkaxes to synchronize axes in different figures in R14 and it didn't work?
Voir également
Catégories
En savoir plus sur Annotations dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!