[R] contours and cutlines

From: Robin Hankin <r.hankin_at_noc.soton.ac.uk>
Date: Fri 10 Jun 2005 - 22:20:57 EST


Hi

Using contour(), one can plot pretty pictures (of potential flow); my problem is removing
the cutline. If I do:

  x <- seq(from=-4,to=4,len=100)
z <- outer(x,1i*x,"+")
contour(x,x,Im(log(z)))

everything is fine except the discontinuity along the negative real axis, which derives
from log()'s cutline.

Before I try to reinvent the wheel, does anyone have a nice way of getting rid of the ugly
bunch of contours that correspond to the discontinuity along the cut line?

Also, something like

contour(x,x,Im((1+2i)*log(z^2/(z-2-1i)/(z-2+1i))),nlevel=33)

has a more complicated cut line. Has anyone got any ideas how to improve the plot (ie
allow the flow lines to be nicely continuous everywhere except the sources)?

--
Robin Hankin
Uncertainty Analyst
National Oceanography Centre, Southampton
European Way, Southampton SO14 3ZH, UK
  tel  023-8059-7743

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Received on Fri Jun 10 22:27:16 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:32:29 EST