[Scilab-users] Use of show_pixmap() obsolete. Alternative??

Stéphane Mttelet stephane.mottelet at utc.fr
Fri Nov 9 00:13:16 CET 2012


Hello,

This problem has already been reported in bug 12028

http://bugzilla.scilab.org/show_bug.cgi?id=12028

The Scilab Team made a really good job in the 5.4.0, but the answer in 
the comments of this bug is not adequate (changing the data field of 
entities). Most Scilab users (the one who use it *daily* for their work 
or their research) are used to make simple animations by simply using 
the drawlater/drawnow pair.

Scilab graphics was already fast in 5.3.3, and now even faster in 5.4 
(the offscreen rendering is really cool). But if the performance 
increase has this kind of counterpart, I will keep on using 5.3.3 : my 
students really appreciate doing animations this way and I don't have 
enough time to teach them the insights of graphical entities.

S.


Le 08/11/12 23:14, Eliseo Chacon Vera a écrit :
> Dear Samuel,
> thanks for your quick answer. The following lines solve the heat 
> equation and provides
>  a smooth evolution of the solution in the plot. SCILAB 5.3.3 likes 
> but SCILAB 5.4.0 does not like it.
> thanks,
> eliseo  (hope this time gets to the list right)
> ///
> // heat equation
> //
> clear;
> //
> // Initial value
> //
> function z=u0(xx)
> if (abs(xx)<=1) then
>      z=1;
> else
>      z=0;
> end
> endfunction
> //
> //  b heat coef.
> //
> b=1;
>
> f0=scf(0);
> f0.pixmap='on';
> clf(f0);
> show_window();
> //
> //  space interval
> //
> xmin=-5;
> xmax=5;
> Nx=125;// Number of points
> h=(xmax-xmin)/Nx;
> x=xmin:h:xmax;
> //
> u=zeros(1,Nx+1);
> uold=zeros(1,Nx+1);
> u2=zeros(1,Nx+1);// dimensionamos inicialmente a cero
> uold2=zeros(1,Nx+1);
> ucero=zeros(1,Nx+1);
> //
> // time
> //
> t0=0;
> time=t0;
>
> for i=1:Nx+1
>     uold(i)=u0(x(i));// initial value
>     uold2(i)=u0(x(i));
>     ucero(i)=u0(x(i));
> end
> plot(x,uold,'dr')
> ejes=gca();
> ejes.data_bounds=[xmin, 0; xmax,1.2];
> title(" Initial data ");
> show_pixmap();
> sleep(1000);
>
> k=0.9*h^2/(2*b);// stability
>
> //
> // coeficiente mu=k/h^2
> //
>
> mu=k/h^2;
>
> //
> coef1=b*mu;
> coef2=1-2*b*mu;
> coef3=b*mu;
>
> //
>     while  (time<0.5)
>      time=time+k;
>       u(1)=0;
>       u(Nx+1)=0;
>      for  i=2:Nx
>       u(i)=coef1*uold(i+1)+coef2*uold(i)+coef3*uold(i-1);
>      end
>      clf(f0);
>     plot(x,u,'or',x,ucero,'db');
>     ejes=gca();
>     ejes.data_bounds=[xmin,  0;  xmax,1.2];
>     title("Euler explicit: time="+string(time)..
>       +"; time step ="+string(k)+..
>       +"; spatial h="+string(h)+"; diffusion ="+string(b));
>      legend('b=1','initial');
>      show_pixmap();
>      uold=u;
>      sleep(1);
> end
>
> ------------------------------------------------------------------------
> View this message in context: Re: Use of show_pixmap() obsolete. 
> Alternative?? 
> <http://mailinglists.scilab.org/Use-of-show-pixmap-obsolete-Alternative-tp4025179p4025186.html>
> Sent from the Scilab users - Mailing Lists Archives mailing list 
> archive 
> <http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html> 
> at Nabble.com.
>
>
> _______________________________________________
> users mailing list
> 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/20121109/a5c0241b/attachment.htm>


More information about the users mailing list