[R] yaxp problem for more irregular time series in one plot
lanczos at fns.uniba.sk
lanczos at fns.uniba.sk
Sun Jul 26 01:10:36 CEST 2009
Good day,
I'm trying to get more time series in one plot. As there are bigger
differences in values of variables I need logaritmic y axis.
The code I use is the following:
nvz_3_data <- read.csv('/home/tomas/R_outputs/nvz_3.csv')
date <- (nvz_3_data$date)
NO3 <- (nvz_3_data$NO3)
NH4 <- (nvz_3_data$NH4)
date_p <- as.POSIXct(date, "CET")
par(mfrow=c(2,1), ylog = TRUE, yaxp = c(0.01, 100, 3))
plot(date_p, NO3, log = "y", type = "l", col = "darkred", main = "NVZ-1",
xlab = "time", ylab = "NO3-" )
lines(date_p, NH4, col = "darkblue", lty = "dotted")
plot(date_p, NH4, log = "y", type = "l", col = "darkblue", main = "NVZ-1",
xlab = "time", ylab = "NH4+" )
So, as I anderstood, extreme (max and min) values on the y axis are
conntrolled byt the yaxp, but it is ignored on the plot, and the NH4
values are out of the plot (see the attached picture). Do somebody know
what I am doing wrong?
Many thanks in advance
Tomas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Rplot001.png
Type: image/png
Size: 15261 bytes
Desc: not available
URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20090726/9407c83c/attachment-0002.png>
More information about the R-help
mailing list