Scilab Home page | Wiki | Bug tracker | Forge | Mailing list archives | ATOMS | File exchange
Please login or create an account
Change language to: English - Português - 日本語

Please note that the recommended version of Scilab is 6.1.1. This page might be outdated.
See the recommended documentation of this function

Aide Scilab >> Graphiques > 2d_plot > champ


2D vector field plot

Calling Sequence




two vectors which define the grid.


a matrix which describes the x component of the vector field. fx(i,j) is the x component of the vector field at point (x(i),y(j)).


a matrix which describes the y component of the vector field. fy(i,j) is the y component of the vector field at point (x(i),y(j)).


This represents a sequence of statements key1=value1,key2=value2,... where key1, key2,... can be one of the following: arfact, rect, strf (see below).


an optional argument of type real which gives a scale factor for the display of the arrow heads on the plot (default value is 1.0).


a vector rect=[xmin,ymin,xmax,ymax] which gives the boundaries of the graphics frame to use.


a string of length 3 "xyz" which has the same meaning as the strf parameter of plot2d. The first character x has no effect with champ.


champ draws a 2D vector field. The length of the arrows is proportional to the intensity of the field.

If you want colored arrows with the color of the arrows depending on the intensity of the field, use champ1.

Enter the command champ() to see a demo.


// using rect as plot boundaries 
// using (x,y) to get boundaries 

See Also

  • champ1 — 2D vector field plot with colored arrows
  • fchamp — direction field of a 2D first order ODE
  • plot2d — 2D plot




Author : Hervé Rabs posted the 31/05/2014 00:04
About this: for example champ(x,x,Fx,Fy) and we have different arrows in the graph.

where are the first component and the second component from champ(x,x,Fx,Fy) when
we draw different arrows in the graph ?( How to create arrows in the graph ?)
I have already looked for a forum in this site but I can't and I am sorry to write my question here.

Yours faithfully,
Hervé Rabs

Reply to this comment
Please login to comment this page

Add a comment:
Please login to comment this page.

<< Sgrayplot 2d_plot champ1 >>

Scilab Enterprises
Copyright (c) 2011-2017 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Wed Oct 05 12:11:00 CEST 2011