[Scilab-users] 2D contour for a non-rectangular region.

Serge Steer Serge.Steer at inria.fr
Fri Jun 7 12:02:15 CEST 2013


Le 07/06/2013 00:50, Ganesh Diwan a écrit :
> How does one go about plotting a 2D contour for a non-rectangular region?
> I have a data file that contains XY data and the potential values at 
> the points. The region of interest is not rectangular.
> Is there a way to generate a contour plot of such a data with Scilab?

Yes, just enter your data in a matrix and set the undefined values to %nan

function z=my_surface(x, y),z=x*sin(x)^2*cos(y),endfunction
t=linspace(-%pi,%pi,30);
z=feval(t,t,my_surface);
z(1:15,1:15)=%nan;
clf;contour(t,t,z,20);

Serge Steer
INRIA
> Many thanks in advance for help.
>
>
> _______________________________________________
> 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/20130607/42a6dfcb/attachment.htm>


More information about the users mailing list