How do i select a point on matlab UIaxes and then get data for it?
Vous suivez désormais cette question
- Les mises à jour seront visibles dans votre flux de contenu suivi.
- Selon vos préférences en matière de communication il est possible que vous receviez des e-mails.
Une erreur s'est produite
Impossible de terminer l’action en raison de modifications de la page. Rechargez la page pour voir sa mise à jour.
0 votes
Partagez un lien vers cette question
Réponse acceptée
2 votes
Partagez un lien vers cette réponse

22 commentaires
Partagez un lien vers ce commentaire
Partagez un lien vers ce commentaire
Partagez un lien vers ce commentaire
Partagez un lien vers ce commentaire
Partagez un lien vers ce commentaire
Partagez un lien vers ce commentaire
Partagez un lien vers ce commentaire
- Make sure the panning tool is not selected (see image below)
- Turn off panning from within the callback function using the line below.

Partagez un lien vers ce commentaire
Partagez un lien vers ce commentaire
- If you're using my function, just before drawrectangle() is called, the title should turn red which indicates that you can draw the rectangle without the axis limits moving around. If you click-and-drag before or after this window of time, the axis limits will be affected.
- Try disabling and enabling all interactivity prior to / after calling drawrectangle() (see below
Partagez un lien vers ce commentaire
Partagez un lien vers ce commentaire
Partagez un lien vers ce commentaire
- Removes any pre-existing datatips in the UIAxes
- waits for a datatip to appear after the user hovers over a data point
- displays the coordinates of the datatip
- If you want to get data from >1 datatip at a time, you could alter the while-loop to either count the number of expected datatips or add a stop-button that triggers the end of the while-loop.
- Depending on how dense your data are, you may want to remove the datatip after it's coordinates are stored so you don't end up with a bunch of datatips cluttering the axes.
- you'll probably want to store the coordinates rather than display them.
Partagez un lien vers ce commentaire
Partagez un lien vers ce commentaire
Partagez un lien vers ce commentaire
Partagez un lien vers ce commentaire
Partagez un lien vers ce commentaire
Plus de réponses (1)
0 votes
Partagez un lien vers cette réponse
2 commentaires
Partagez un lien vers ce commentaire
Partagez un lien vers ce commentaire
Catégories
En savoir plus sur Interactive Control and Callbacks dans Centre d'aide et File Exchange
Voir également
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Sélectionner un site web
Choisissez un site web pour accéder au contenu traduit dans votre langue (lorsqu'il est disponible) et voir les événements et les offres locales. D’après votre position, nous vous recommandons de sélectionner la région suivante : .
Vous pouvez également sélectionner un site web dans la liste suivante :
Comment optimiser les performances du site
Pour optimiser les performances du site, sélectionnez la région Chine (en chinois ou en anglais). Les sites de MathWorks pour les autres pays ne sont pas optimisés pour les visites provenant de votre région.
Amériques
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
