[Scilab-users] Exporting graphics as non pink jpg with xinit/xend

Rafael Guerra jrafaelbguerra at hotmail.com
Sat Nov 19 11:45:26 CET 2016


There was a small obvious typo on last code provide ('j' -> "i"). Corrected below.
One remark: the first time I ran the code snippet, the first file output "test1.jpg" was sort of empty and pink, but not the two other files. During subsequent trials the issue did not repeat.

///// START OF CODE
driver("JPG");
xdel()
y=[];
for i=1:3
    str = "test" + string(i) + ".jpg";
    xinit(str);
    x=[0 1];
    y(i,:)= i*x;
    for j=1:i
        plot(x,y(j,:));
    end
    xend();
end
///// END OF CODE

Regards,
Rafael

From: users [mailto:users-bounces at lists.scilab.org] On Behalf Of Jens Simon Strom
Sent: Saturday, November 19, 2016 10:56 AM
To: Users mailing list for Scilab <users at lists.scilab.org<mailto:users at lists.scilab.org>>
Subject: Re: [Scilab-users] Exporting graphics as non pink jpg with xinit/xend

Thanks Rafael,

The three files are not pink (which is great) but do not show what I want. I want to have superposed plots, i.e.
test1.jpg should show one line (namely (x,1*x), that's the case)
test2.jpg should show two lines (namely (x,2*x) and (x,1*x), that's not the case)
test3.jpg should show three lines (namely (x,3*x) and (x,2*x) and (x,1*x,that's not the case)

Consecutive plots are normally superposed in Scilab. But here we get just the new ones.

Do you see a way to unpink superposed plots? I am trying for hours with no succes.

Kind regards
Jens
------------------------------------------------------


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20161119/49d45456/attachment.htm>


More information about the users mailing list