[R] behaviour of plot() when coord. are out of range

Marcus Eger marcus.eger at physik.uni-marburg.de
Fri Sep 22 19:55:30 CEST 2000


Dear all,

a question concerning the plot range. When I plot
at first with linear coordinates, a subsequent polygon() call produces
a figure that I expect. However, when I apply a logarithmic scale,
two polygons appear. Is it possible to override this behaviour?

  M. Eger


Example:

y <- c(1.84147098480790, 1.90929742682568, 1.14112000805987,
0.243197504692072, -0.958924274663133,0.720584501801074,
1.65698659871879, 1.98935824662338, 1.41211848524176,0.45597888911063)

plot(y,ylim=c(0.0000000001,2),type="l")

plot(y,ylim=c(0.0000000001,2),type="l",log="y")
Warning in xy.coords(x, y, xlabel, ylabel, log) : 
	 1 y value <= 0 omitted from logarithmic plot

polygon(1:10,y,col="red")

-- 
+-------------------------------------------------------
| Marcus Eger
| Philipps Universitaet Marburg
| Fachbereich Physik AG Neurophysik
| Renthof 7
| 35032 Marburg
| Tel. +49 6421 282-4169
| Fax  +49 6421 282-7034
+-------------------------------------------------------
| E-Mail: marcus.eger at physik.uni-marburg.de
+-------------------------------------------------------
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list