Skip to content

arrows on contour lines

2 messages · robin hankin, PIKAL Petr

#
Hello everybody

I'm using contour() to draw streamlines of potential flow, eg

  jj <- seq(from= -4, to=4,len=20)
  jj <- outer(jj,jj,function(x,y){x})+1i*outer(jj,jj,function(x,y){y})

  f <- function(x){x^2}
  contour(Im(f(jj)), nlevels=44 , labels="")

How best to put arrows on the contour lines to show the direction of flow?
  (ie  I want contour lines looking like ---<---  and ---->----)

I think this is a lot of work, which I don't mind doing, but it'd be 
good to hear the list's ideas before starting to bark up the wrong 
tree, so to speak.
#
Hi
On 14 Jan 2004 at 12:01, Robin Hankin wrote:

            
something like that 

contour(Im(f(jj)), nlevels=44 , labels=c(">","<"))

will give you direction.

I would use some coded vector of directions for selecting a direction
will give you directions.

Hope this helps

Petr
Petr Pikal
petr.pikal at precheza.cz