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

classic Classic list List threaded Threaded
4 messages Options
amonmayr amonmayr
Reply | Threaded
Open this post in threaded view
|

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

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 and do you know any workaround to zoom on a plot inside a frame?
2) I plan to report a bug, any advice on the short summary keywords? "zoom not working on plots inside frame or tab uicontrols"?

Cheers,

Antoine

_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users
Samuel GOUGEON Samuel GOUGEON
Reply | Threaded
Open this post in threaded view
|

Re: frame, plot & non working zoom: your help for a bug report and a possible workaround

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

_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users
amonmayr amonmayr
Reply | Threaded
Open this post in threaded view
|

Re: ?==?utf-8?q? ?==?utf-8?q? frame, plot & non working zoom: your help for a bug report and a possible workaround

> Your example does not involve uicontrol tab. So tabs can't be the cause
> here.

I know, but this is my minimum bugging example.
In my code, I first encountered this bug with a plot inside a tab.
I think that the bug is present whenever a plot is not directly a children of the figure, but the children of any uicontrol.

Antoine

_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users
amonmayr amonmayr
Reply | Threaded
Open this post in threaded view
|

Re: frame, plot & non working zoom: your help for a bug report and a possible workaround

In reply to this post by amonmayr
Bug submitted: https://bugzilla.scilab.org/show_bug.cgi?id=15325

Thanks for your feedbacks.

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 and do you know any workaround to zoom on a plot inside a frame?
> 2) I plan to report a bug, any advice on the short summary keywords? "zoom not working on plots inside frame or tab uicontrols"?
>
> Cheers,
>
> Antoine
>
> _______________________________________________
> users mailing list
> [hidden email]
> http://lists.scilab.org/mailman/listinfo/users
>

--
+++++++++++++++++++++++++++++++++++++++++++++++++++++++

  Antoine Monmayrant LAAS - CNRS
  7 avenue du Colonel Roche
  BP 54200
  31031 TOULOUSE Cedex 4
  FRANCE

  Tel:+33 5 61 33 64 59
 
  email : [hidden email]
  permanent email : [hidden email]

+++++++++++++++++++++++++++++++++++++++++++++++++++++++

_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users