Skip to content
Prev 5917 / 398506 Next

Drawing Trig Function

On Wed, 31 May 2000, Ko-Kang Wang wrote:

            
Yes
I think it draws what it's supposed to. It doesn't draw what you want,
perhaps.  The problem is that you are drawing an unbounded function, so
what you get will be determined almost entirely by how close x gets to the
singularities at odd multiples of pi/2.

You probably want to plot something like
   pmax(-10,pmin(10,tan(x)))
or
   ifelse(abs(tan(x))>10,NA,tan(x))


	-thomas

Thomas Lumley
Assistant Professor, Biostatistics
University of Washington, Seattle

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._