[Scilab-users] xtitle hides figure cintent

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

[Scilab-users] xtitle hides figure cintent

Hallo Scilab family,

After two decades of using Scilab I was not able to fix the following problem.

fig=figure('visible','off');
plot(0:5,0:5)
//xtitle('xtitle hides the figure content.')    
set(fig,'visible','on');

The script does what I expect. However when uncommenting xtitle the figure is blank (Version 5.5.2*). What can I do?

The background of this question is a script which creates some 10 figures which are filled with polylines in a loop. Whithout the visible off/on  there is a nervous flicker of graphics which I want to avoid. 
But xtitle is a must.

*) I cannat go to Version 6 because most of my earlier scripts would not run.

Regards
Jens

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

Re: xtitle hides figure cintent


Jens,

I've tried this in Scilab 6.1 and it works fine.

I understand the problem of backwards compatibility. I really do, since I had about 1000 Matlab fully working scripts and functions when I decided to migrate to Scilab. Most of them need much more than cosmetic changes like // for %. But it was worth the effort. The successive changes from 5.5.2 through 6.1 were much smoother than changing  application altoghether

In your case, unless you don't plan ever to benefit from improvements of new Scilab versions (including knonw bugs which no one will fix for earlier versions), you should try 6.1. There is no problem to keep 5.5.2 installed and start working in 6.1. If you need to run an older script and don't want to update it, you just open it in 5.5.2.

Regards,

Federico


On 16/03/2020 18:46, Jens Simon Strom wrote:

Hallo Scilab family,

After two decades of using Scilab I was not able to fix the following problem.

fig=figure('visible','off');
plot(0:5,0:5)
//xtitle('xtitle hides the figure content.')    
set(fig,'visible','on');

The script does what I expect. However when uncommenting xtitle the figure is blank (Version 5.5.2*). What can I do?

The background of this question is a script which creates some 10 figures which are filled with polylines in a loop. Whithout the visible off/on  there is a nervous flicker of graphics which I want to avoid. 
But xtitle is a must.

*) I cannat go to Version 6 because most of my earlier scripts would not run.

Regards
Jens

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


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

Re: ?==?utf-8?q? xtitle hides figure cintent

In reply to this post by Jens
Hello Jens,

I'm sorry, I cannot try your code on scilab-5.5.2 : I just downloaded and installed it but it segfaults whenever using graphics (ie only scilab-cli works).
BTW, should I report this or development/bug fixes are over on 5.5.2?

If I remember correctly, updating graphics content and properties in a loop was a bit of a problem with 5.5.2 with some race conditions.
Results depended on the timing and for example something that worked OK when selecting + Ctrl+E in the editor was not behaving the same when using F5!
In particular, I had different results when outputting to a file (ie png driver or equivalent) or to an interactive plot.

Here are a couple of thinks to try that I had to resort to with 5.5.2:
- try to run your code by using selection + Ctrl+E, maybe by running small chunks at a time. If you get the intended results, it confirms you are facing a race condition.
- try different syntaxes that should be equivalent like fig.children.x_label.text='foo' instead of xtitle('foo') or fig.visible='on' instead of  set(fig,'visible','on').
- add some pauses, ie sleep(10) between some of the graphics changes.
- try again: like repeat the set(fig,'visible','on');  twice.

Hope it helps, let us know whether it works or not.

Cheers,

Antoine
 
 
Le Lundi, Mars 16, 2020 22:46 CET, Jens Simon Strom <[hidden email]> a écrit:
 

> Hallo Scilab family,
>
> After two decades of using Scilab I was not able to fix the following
> problem.
>
> fig=figure('visible','off');
> plot(0:5,0:5)
> //xtitle('xtitle hides the figure content.')
> set(fig,'visible','on'); The script does what I expect. However when
> uncommenting xtitle the figure is blank (Version 5.5.2*). What can I do?
> The background of this question is a script which creates some 10
> figures which are filled with polylines in a loop. Whithout the visible
> off/on there is a nervous flicker of graphics which I want to avoid.
> Butxtitle is a must. *) I cannat go to Version 6 because most of my
> earlier scripts would not run. Regards Jens
>

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

Re: ?==?utf-8?q? xtitle hides figure cinten

> - try different syntaxes that should be equivalent like fig.children.x_label.text='foo' instead of xtitle('foo') or fig.visible='on' instead of  set(fig,'visible','on').

Sorry, I meant fig.children.title.text='foo' instead of xtitle('foo')

Antoine

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