Hello.
I use GNU/Linux. This code crashes not only Scilab but whole session of my operating system. I use RFRemix-18, 64-bit, KDE.

Stanislav

10.01.2014 20:39, Rafael Guerra пишет:

Hello Samuel,

Thanks for the excellent "auto_resize off" tip and the great help you give to the Scilab community (idem for Serge Steer and some other contributors).

We are now close to the solution.... but still have a crash problem for larger plot windows, despite the scroll bar is now included.

Please run the code below with scale = 1/200 and then with scale=1/20, and let us know if your Scilab crashes too for scale= 1/20 (either immediately or when trying to slide the scroll bar).

/// Code adapted from Serge Steer's script:/

_clf_;

_plot_(_linspace_(0,100,10),_linspace_(0,150,10))

fig=_gcf_();

ax=_gca_();

ax.tight_limits="on";

///Dimensions of the axis in user coordinates/

ax_xu=ax.data_bounds(2,1)-ax.data_bounds(1,1);

ax_yu=ax.data_bounds(2,2)-ax.data_bounds(1,2);

///pixel size in mm to be determined according to screen size and resolution (dpi)/

dpi=90;/// dots per inch (depending on screen resolution)/

px=2.54e-2/dpi;///conversion from pixel to meter/

///py= 2.54e-2/dpi;//conversion from pixel to meter/

printf("\nSetting scale=1/200 is fine but scale=1/20 crashes Scilab 5.4.1 in Win 7\n");

scale=_input_("ENTER scale = ");

/// scale= 1/200;  // OK/

/// scale= 1/20; // Scilab aborts (Win 7) as window is larger than screen!/

///Dimension of the axis in pixels /

ax_xp=ax_xu/px*scale;

///ax_yp= ax_yu/py;/

///Dimension of the current portion of the canvas in pixels/

ax_Wp=ax_xp/(1-sum(ax.margins(1:2)));

///ax_Hp= ax_yp/(1-sum(ax.margins(3:4)));/

///Canvas dimensions in pixels/

fig_Wp=ax_Wp/ax.axes_bounds(3);

///fig_Hp=ax_Hp/ax.axes_bounds(4);/

fig_Hp=ax_yu;

/// Samuel Gougeon's tip:/

fig.auto_resize="off";

///Set fig.axes_size property to have /

fig.axes_size=[fig_Wp,fig_Hp];

Kind regards

Rafael G.

*From:*users [mailto:[email protected]] *On Behalf Of *Samuel Gougeon
*Sent:* Friday, January 10, 2014 1:25 PM
*To:* International users mailing list for Scilab.
*Subject:* Re: [Scilab-users] Scaled plot displays in Scilab?

Le 09/01/2014 22:54, Rafael Guerra a écrit :

    .../...

    It would be very useful to be able to display a scaled plot with
    scrolling bars, to be able to browse the plot details.

Just do:
fig.auto_resize = "off";

Samuel



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

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

Reply via email to