Hallo Rafael,
That is a very smart solution. Thanks!
In the meantime I have detected another approach: Learning about driver() from the help page it suggested impicitely to me that the command is only useful together with xinit() and xend(). This was a premature assumption. My very first trial used xs2jpg(). If I had put this initial script betweendriver("JPG") and driver("REC") I would never have met xinit(), xend(), and the /pinkification phenomena/. Five hours of struggling for the birds!
Problem solved!
Regards
Jens
-------------------------------------------

Am 19.11.2016 14:51, schrieb Rafael Guerra:

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

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

Reply via email to