plot(x,y) is incorrect for y being encoded integers
@sgougeon)
Reported by Samuel GOUGEON (BUG DESCRIPTION:
----------------
As reported on users@ here
https://www.mail-archive.com/users@lists.scilab.org/msg08293.html
plot(x,y) is incorrect for y being encoded integers
x = (1:20)/20;
y = iconvert(100*rand(1,20),2);
plot(x, y)
The bug: The plot represents x vs its index:
--> gce().children.data
ans =
1. 0.05
2. 0.1
3. 0.15
4. 0.2
5. 0.25
6. 0.3
7. 0.35
8. 0.4
9. 0.45
10. 0.5
11. 0.55
12. 0.6
13. 0.65
14. 0.7
15. 0.75
16. 0.8
17. 0.85
18. 0.9
19. 0.95
20. 1.
ERROR LOG:
----------
None. Wrong display.
HOW TO REPRODUCE THE BUG:
-------------------------
x = (1:20)/20;
y = iconvert(100*rand(1,20),2);
plot(x, y)
data = gce().children.data;
and(data(:,1)==x) & and(data(:,2)==y)
OTHER INFORMATION:
------------------
The bug occurred already in Scilab 5.3.3, and likely in Scilab 4.
Edited by Vincent COUVERT