ginput slow when plotted a lot of points
Mostra commenti meno recenti
Hi, i'm experiencing a strange behaviour of the ginput command.
I plotted on an axis quite a huge number of points (more than 4 millions). Everything behaves quickly (pan and zooming are fast).
When i run a ginput on this axis it becomes painfully slow. The crosshair-like pointer is lagged (it follows the actual position of the mouse with a delay of some seconds).
the only solution i found so far is to overlay a transparent axis over the real one, with the same extents, and run the ginput over this second one.
This solution actually works but is really slow to code (i often have to do it) and could cause some problems (e.g in case of zooming it's quite difficult to keep the axis aligned).
In general i don't think this solution is elegant, so my question is:
did anyone else experience the same problem and find a better solution or workaround?
Thanks!
Marco
1 Commento
Paolo
il 14 Ago 2013
Hi Marco, could you please write the lines of code that you used to overlay a transparent axis with aligned axes? I'm experiencing the same problem with ginput...
Thanks, Paolo
Risposte (3)
Walter Roberson
il 29 Set 2011
1 voto
linkaxes() should keep the axes aligned.
If you have to code it often, then it would seem natural to code the repeated elements in to functions and then just call upon them ?
1 Commento
Marco
il 29 Set 2011
Marijan Herak
il 2 Mar 2018
1 voto
Try choosing OpenGL renderer for the figure - set(gcf,'renderer','opengl'). It works for me, and ginput is smooth and responsive again (over 100.000 points in the figure).
Marco
il 4 Ott 2011
0 voti
3 Commenti
Walter Roberson
il 4 Ott 2011
Perhaps you could simply turn hittest off in the properties of the handles for the points?
Philippe
il 19 Lug 2012
That worked for me. ginput is very fluid with the HitTest off.
Camilo Cárdenas
il 26 Feb 2025
lo he aplicado en un plot dentro de una aplicacion hecha en appdesigner:
set(app.UIAxes.Children, 'HitTest', 'off');
pero lamentablemente sigo teniendo un retardo en la reaccion del cursor. ¿Alguna idea para estos casos de appdesigner?
Gracias, ccarden
Categorie
Scopri di più su Graphics Performance in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!