[R] arrows on contour lines

Robin Hankin rksh at soc.soton.ac.uk
Wed Jan 14 13:01:12 CET 2004

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.

Robin Hankin
Uncertainty Analyst
Southampton Oceanography Centre
SO14 3ZH
tel +44(0)23-8059-7743
initialDOTsurname at soc.soton.ac.uk (edit in obvious way; spam precaution)

More information about the R-help mailing list