Problem with HitTest. I can not zoom on ax1 when ax2 is on top of it. The code works in Matlab 2012b.
Mostrar comentarios más antiguos
I have to axes ax1 and ax2 on top of each other. I want to make ax2 invisible and then zoom on ax1.
This I could in Matlab 2012b but it does not work in 2015a. Pickableparts property that is introduced in 2015a is set to visible for both ax1 and ax2. HitTest property is on for ax1 and off for ax2 Visible property is on for ax1 and off ax2
Why can I not zoom on ax1 then?
Br Søren Furbo
h=figure(1);
ax1 = axes( ... 'Units','normalized', ... 'Position',[ 0.1 0.1 0.8 0.8]);
ax2 = axes( ... 'Units','normalized', ... 'Position',get(ax1,'Position'),... 'YAxisLocation','right',... 'Color','none');
set(ax2,'visible','off') set(ax2,'HitTest','off')
Respuestas (1)
Titus Edelhofer
el 17 de Jun. de 2015
Hi,
I'm not yet sure, why this happens. Programmatically you can change the behavior to the desired as follows:
hz = zoom(h);
hz.Enable = 'on'
setAllowAxesZoom(hz, ax2, false)
I'll have a look why your approach does not work ...
Titus
4 comentarios
Soeren Olesen Furbo
el 17 de Jun. de 2015
Titus Edelhofer
el 17 de Jun. de 2015
Agreed ... as I wrote, I'm still investigating...
Soeren Olesen Furbo
el 17 de Jun. de 2015
Soeren Olesen Furbo
el 18 de Jun. de 2015
Categorías
Más información sobre Data Exploration en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!