[Scilab-users] frame, plot & non working zoom: your help for a bug report and a possible workaround

Samuel Gougeon sgougeon at free.fr
Fri Nov 10 23:43:53 CET 2017


Hello Antoine,

Le 10/11/2017 à 21:32, Antoine Monmayrant a écrit :
> Hello Scilab users,
>
> I'm facing a bug that prevents zooming on a plot inside a frame (or a tab).
> Here is my minimum working (or bugging) example:
>
> //////////////////////////////////
> // Two axes in one figure:
> // left one is inside a frame
> // right one is directly attached to the figure
> // GUI zoom and zoom_rect don't work on the left plot
>
> h=scf();
> h.axes_size=[800,600];
> a_right=newaxes(h);
> a_right.axes_bounds(3)=0.5;
> a_right.axes_bounds(1)=0.5
> plot2d()
> a_right.title.text="GUI zoom & zoom_rect work here";
>
> frame_left = uicontrol(h, ...
>     "style", "frame", ...
>     "backgroundcolor", [1 0 1], ...
>     "Position", [0,0,400,600]);
> a_left=newaxes(frame_left);
> plot2d();
> a_left.title.text="GUI zoom & zoom_rect DO NOT work here";
> //////////////////////////////////
>
> Now come the questions:
>
> 1) Did you face the same bug

Yes i do on the 6.0 NB-Jenkins of yesterday

> and do you know any workaround to zoom on a plot inside a frame?

Interactively: with the mouse wheel, and then panning (click-hold and drag)
Otherwise: the gca().zoom_box property should work (it does with the wheel).

> 2) I plan to report a bug, any advice on the short summary keywords? "zoom not working on plots inside frame or tab uicontrols"?
Yes. "zoom_rect() can't focus on and fails in a uicontrol frame".

Your example does not involve uicontrol tab. So tabs can't be the cause 
here.
The figure's button runs zoom_rect().

Cheers
Samuel




More information about the users mailing list