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

Rafael Guerra jrafaelbguerra at hotmail.com
Sat Nov 19 11:18:48 CET 2016


Jens,

Check the following with an extra loop, it works fine for me:

///// START OF CODE
driver("JPG");
xdel()
y=[];
for i=1:3
    str = "test" + string(i) + ".jpg";
    xinit(str);
    x=[0 1];
    y(i,:)= j*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>
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
------------------------------------------------------


Am 19.11.2016 10:15, schrieb Rafael Guerra:
Hi Jens,

Just to let you know that in my Win7 Scilab 5.5.2 installation, the code here below outputs 3 proper JPEGs with no pink colors:

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

PS: all 3 files look good in IrfanView 64-bits.

Regards,
Rafael


From: users [mailto:users-bounces at lists.scilab.org] On Behalf Of Jens Simon Strom
Sent: Friday, November 18, 2016 8:44 PM
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

Correction: The first phrase should read: In the following script I would like to save the sequential plots as (pinkless) JPGs.
Am 18.11.2016 20:30, schrieb Jens Simon Strom:
Hi,
In the following script I would like to save the sequential plot result as a pinkless jpg. I found no way to adapt the xinit/xend workaround (for xs2jpg) to this case. After execution I would like to have three JPGs containing one, two and three lines .

xdel()

for i=1:3

    x=[0 1];

    plot(x,i*x)

    halt()

end
In my real project the plots are param3d and plot3d. I hope that makes no difference.

Hoping for help with kind regards
Jens









_______________________________________________

users mailing list

users at lists.scilab.org<mailto:users at lists.scilab.org>

http://lists.scilab.org/mailman/listinfo/users

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


More information about the users mailing list