Hi Jens,

You may avoid the second loop by plotting as columns:

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

Regards,
Rafael

From: users [mailto:[email protected]] On Behalf Of Jens Simon 
Strom
Sent: Saturday, November 19, 2016 2:23 PM
To: Users mailing list for Scilab <[email protected]>
Subject: Re: [Scilab-users] Exporting graphics as non pink jpg with xinit/xend

Thanks Rafael,
That is a working solution!  However it introduces further complexity and 
computation time rises from n to n*n/2. In my project I have hundreds of files 
to produce an animation,  and the one command 'plot(x,y(j,:));' in the minimal 
snippet represents about successive 10 plots in my project. I consider to go 
back to the flawless pdf export and to look for a conversion tool pdf2jpg 
supporting batch conversions.
Regards
Jens


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

Reply via email to