[Scilab-users] ?==?utf-8?q? ?==?utf-8?q? Bug?: plot with nan values (Linux Ubuntu 17.04)

Antoine Monmayrant amonmayr at laas.fr
Thu Oct 19 10:21:12 CEST 2017


Thank you all for your answers.
It does look like a graphic bug that is only affecting some Linux machines.
I refined my test script to compare the obtained plots when plotting on the screen and directly in a file ('driver').
It seems graphic direver related to me.
I'll fill a bug report.

Cheers,

Antoine

////////////////////////////////////////////////
x=1:100;
y=rand(x);
th=0.1;
rg=find(y<th);
ynan=y;
ynan(rg)=%nan;

h=scf();
plot(x,y,'k.-');
plot(x,ynan,'r.-');
xtitle('BUG');

fpath=TMPDIR+'/nobug_plot_nan.png';
previous_driver = driver('PNG');
xinit(fpath);

scf();
plot(x,y,'k.-');
plot(x,ynan,'r.-');
xtitle('NO BUG');

xend();
driver(previous_driver);
stat=unix("xdg-open "+fpath);
xs2png(h,TMPDIR+'/bug_plot_nan.png');
/////////////////////////////////////////////////
 
 
Le Mercredi, Octobre 18, 2017 13:22 CEST, "Antoine Monmayrant" <antoine.monmayrant at laas.fr> a écrit: 
 
> Hi everyone,
> 
> I think I stumble upon a weird bug when plotting data with nan values: instead of a gap in the plot line, I have segments that go go towards the center of my plots.
> This bug is present on Ubuntu 17.04, but not on Ubuntu 16.04 and it affects both scilab 5.5.2 and 6.0.
> I attached the expected plot ('no_bug.png', what I get with 16.04), the bugged one ('bug.png') and the minimum working example ('bug_plot_nan.sce') with the original dataset with nans ('dat_with_nans.txt').
> Are you also affected by this bug? Which platform (OS) are you working on?
> 
> Cheers,
> 
> Antoine
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bug_plot_nan.png
Type: image/png
Size: 15705 bytes
Desc: not available
URL: <https://lists.scilab.org/pipermail/users/attachments/20171019/2dd9edc5/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: nobug_plot_nan.png
Type: image/png
Size: 17874 bytes
Desc: not available
URL: <https://lists.scilab.org/pipermail/users/attachments/20171019/2dd9edc5/attachment-0001.png>


More information about the users mailing list