diff --git a/R/plot.R b/R/plot.R index c23351a..2018b8b 100644 --- a/R/plot.R +++ b/R/plot.R @@ -86,13 +86,13 @@ image_to_matrix <- function(m) { #' xg <- seq(-350, 200, length = 100) #' yg <- seq(-125, 125, length = 100) #' -#' contours(ml, xg, yg, nlevels = 20, col = 'dodgerblue3', labcex = 1) -#' contours(ml, xg, yg, 'streamfunction', nlevels = 20, col = 'orange3', +#' contours(ml, xg, yg, nlevels = 20, col = 'dodgerblue', labcex = 1) +#' contours(ml, xg, yg, 'streamfunction', nlevels = 20, col = 'orange', #' drawlabels = FALSE, add = TRUE) #' #' # Not to be confused by contour() #' try( -#' contour(ml, xg, yg, nlevels = 20, col = 'dodgerblue3', labcex = 1) +#' contour(ml, xg, yg, nlevels = 20, col = 'dodgerblue', labcex = 1) #' ) #' #' # For image() or filled.contour() @@ -220,7 +220,7 @@ plot.element <- function(x, y = NULL, add = FALSE, pch = 16, cex = 0.75, use.wid #' xg <- seq(-500, 500, length = 200) #' yg <- seq(-250, 250, length = 100) #' -#' contours(m, x = xg, y = yg, col = 'dodgerblue3', nlevels = 20) +#' contours(m, x = xg, y = yg, col = 'dodgerblue', nlevels = 20) #' plot(m, add = TRUE) #' plot.aem <- function(x, y = NULL, add = FALSE, xlim, ylim, frame.plot = TRUE, ...) { @@ -263,12 +263,12 @@ plot.aem <- function(x, y = NULL, add = FALSE, xlim, ylim, frame.plot = TRUE, .. #' @examples #' #' # plot arrows -#' contours(m, xg, yg, col = 'dodgerblue3', nlevels = 20) -#' plot(paths, add = TRUE, col = 'orange3', arrows = TRUE, length = 0.05) +#' contours(m, xg, yg, col = 'dodgerblue', nlevels = 20) +#' plot(paths, add = TRUE, col = 'orange', arrows = TRUE, length = 0.05) #' #' # plot point markers every 2.5 years -#' contours(m, xg, yg, col = 'dodgerblue3', nlevels = 20) -#' plot(paths, add = TRUE, col = 'orange3', marker = 2.5 * 365, pch = 20) +#' contours(m, xg, yg, col = 'dodgerblue', nlevels = 20) +#' plot(paths, add = TRUE, col = 'orange', marker = 2.5 * 365, pch = 20) #' #' # plot point markers every 600 days #' plot(paths, add = TRUE, col = 'forestgreen', marker = 600, pch = 1) diff --git a/R/tracelines.R b/R/tracelines.R index 03d2965..95cdce5 100644 --- a/R/tracelines.R +++ b/R/tracelines.R @@ -201,8 +201,8 @@ outside_vertical <- function(aem, x, y, z, ...) { #' xg <- seq(-500, 500, length = 100) #' yg <- seq(-300, 300, length = 100) #' -#' contours(m, xg, yg, col = 'dodgerblue3', nlevels = 20) -#' plot(paths, add = TRUE, col = 'orange3') +#' contours(m, xg, yg, col = 'dodgerblue', nlevels = 20) +#' plot(paths, add = TRUE, col = 'orange') #' points(endp[, c('x', 'y')]) #' #' # Backward tracking with retardation; plot point marker every 5 years @@ -215,13 +215,13 @@ outside_vertical <- function(aem, x, y, z, ...) { #' ls <- headlinesink(x0 = -100, y0 = 100, x1 = 400, y1 = -300, hc = 7) #' #' m <- aem(k, top, base, n = n, uf, rf, w1, w2, ls) -#' contours(m, xg, yg, col = 'dodgerblue3', nlevels = 20) +#' contours(m, xg, yg, col = 'dodgerblue', nlevels = 20) #' plot(m, add = TRUE) #' #' x0 <- seq(-400, 400, 50); y0 <- 200 #' times <- seq(0, 5 * 365, 365 / 20) #' paths <- tracelines(m, x0 = x0, y0 = y0, z0 = top, times = times) -#' plot(paths, add = TRUE, col = 'orange3') +#' plot(paths, add = TRUE, col = 'orange') #' #' # User-defined termination in rectangular zone #' tzone <- cbind(x = c(-300, -200, -200, -300), y = c(150, 150, 100, 100)) @@ -233,10 +233,10 @@ outside_vertical <- function(aem, x, y, z, ...) { #' return(in_poly) #' } #' paths <- tracelines(m, x0 = x0, y0 = y0, z0 = top, times = times, tfunc = termf) -#' contours(m, xg, yg, col = 'dodgerblue3', nlevels = 20) +#' contours(m, xg, yg, col = 'dodgerblue', nlevels = 20) #' plot(m, add = TRUE) #' polygon(tzone) -#' plot(paths, add = TRUE, col = 'orange3') +#' plot(paths, add = TRUE, col = 'orange') #' #' # model with vertical flow due to area-sink #' as <- areasink(xc = 0, yc = 0, N = 0.001, R = 1500) @@ -245,9 +245,9 @@ outside_vertical <- function(aem, x, y, z, ...) { #' # starting z0 locations are above aquifer top and will be reset to top with warning #' paths <- tracelines(m, x0 = x0, y0 = y0, z0 = top + 0.5, times = times) #' -#' contours(m, xg, yg, col = 'dodgerblue3', nlevels = 20) +#' contours(m, xg, yg, col = 'dodgerblue', nlevels = 20) #' plot(m, add = TRUE) -#' plot(paths, add = TRUE, col = 'orange3') +#' plot(paths, add = TRUE, col = 'orange') #' #' # plot vertical cross-section of traceline 4 along increasing y-axis (from south to north) #' plot(paths[[4]][,c('y', 'z')], type = 'l') @@ -372,9 +372,9 @@ endpoints <- function(tracelines, ...) { #' xg <- seq(-800, 800, length = 100) #' yg <- seq(-500, 500, length = 100) #' -#' contours(m, xg, yg, col = 'dodgerblue3', nlevels = 20) +#' contours(m, xg, yg, col = 'dodgerblue', nlevels = 20) #' plot(cp5, add = TRUE) -#' plot(cp10, add = TRUE, col = 'orange3') +#' plot(cp10, add = TRUE, col = 'orange') #' #' # model with vertical flow components #' as <- areasink(0, 0, N = 0.001, R = 1500) @@ -384,7 +384,7 @@ endpoints <- function(tracelines, ...) { #' cp5a <- capzone(m, w1, time = 5*365, zstart = base) #' cp5b <- capzone(m, w1, time = 5*365, zstart = 8) #' -#' contours(m, xg, yg, col = 'dodgerblue3', nlevels = 20) +#' contours(m, xg, yg, col = 'dodgerblue', nlevels = 20) #' plot(cp5a, add = TRUE) #' plot(cp5b, add = TRUE, col = 'forestgreen') # smaller zone #' diff --git a/R/utils.R b/R/utils.R index 9409294..77c2902 100644 --- a/R/utils.R +++ b/R/utils.R @@ -147,7 +147,7 @@ dirflow <- function(aem, x, y, angle, #' m <- aem(k = 10, top = 10, base = 0, n = 0.2, rf, uf) #' #' xg <- seq(-500, 500, l=100); yg <- seq(-300, 300, l=100) -#' contours(m, xg, yg, col='dodgerblue3', nlevels=20) +#' contours(m, xg, yg, col='dodgerblue', nlevels=20) #' #' x0 <- -200 #' y0 <- -50 @@ -160,7 +160,7 @@ dirflow <- function(aem, x, y, angle, #' #' w <- well(125, 200, 150) #' m <- aem(k = 10, top = 10, base = 0, n = 0.2, rf, uf, w) -#' contours(m, xg, yg, col='dodgerblue3', nlevels=20) +#' contours(m, xg, yg, col='dodgerblue', nlevels=20) #' lines(matrix(c(x0, y0, x1, y1), ncol = 2, byrow = TRUE)) #' #' flow_through_line(m, x0, y0, x1, y1, flow = 'darcy') diff --git a/man/aem.Rd b/man/aem.Rd index 6729382..70c16da 100644 --- a/man/aem.Rd +++ b/man/aem.Rd @@ -157,7 +157,7 @@ plot(m, xlim = c(-500, 500), ylim = c(-250, 250)) xg <- seq(-500, 500, length = 200) yg <- seq(-250, 250, length = 100) -contours(m, x = xg, y = yg, col = 'dodgerblue3', nlevels = 20) +contours(m, x = xg, y = yg, col = 'dodgerblue', nlevels = 20) plot(m, add = TRUE) } diff --git a/man/capzone.Rd b/man/capzone.Rd index cf9f0b8..7b56095 100644 --- a/man/capzone.Rd +++ b/man/capzone.Rd @@ -55,9 +55,9 @@ cp10 <- capzone(m, w2, time = 10*365) xg <- seq(-800, 800, length = 100) yg <- seq(-500, 500, length = 100) -contours(m, xg, yg, col = 'dodgerblue3', nlevels = 20) +contours(m, xg, yg, col = 'dodgerblue', nlevels = 20) plot(cp5, add = TRUE) -plot(cp10, add = TRUE, col = 'orange3') +plot(cp10, add = TRUE, col = 'orange') # model with vertical flow components as <- areasink(0, 0, N = 0.001, R = 1500) @@ -67,7 +67,7 @@ m <- aem(k, top, base, n = n, uf, rf, w1, w2, as) cp5a <- capzone(m, w1, time = 5*365, zstart = base) cp5b <- capzone(m, w1, time = 5*365, zstart = 8) -contours(m, xg, yg, col = 'dodgerblue3', nlevels = 20) +contours(m, xg, yg, col = 'dodgerblue', nlevels = 20) plot(cp5a, add = TRUE) plot(cp5b, add = TRUE, col = 'forestgreen') # smaller zone diff --git a/man/contours.Rd b/man/contours.Rd index 06406f4..5eebddb 100644 --- a/man/contours.Rd +++ b/man/contours.Rd @@ -47,13 +47,13 @@ ml <- aem(k = 10, top = 10, base = 0, n = 0.2, w, wi, uf, rf) xg <- seq(-350, 200, length = 100) yg <- seq(-125, 125, length = 100) -contours(ml, xg, yg, nlevels = 20, col = 'dodgerblue3', labcex = 1) -contours(ml, xg, yg, 'streamfunction', nlevels = 20, col = 'orange3', +contours(ml, xg, yg, nlevels = 20, col = 'dodgerblue', labcex = 1) +contours(ml, xg, yg, 'streamfunction', nlevels = 20, col = 'orange', drawlabels = FALSE, add = TRUE) # Not to be confused by contour() try( -contour(ml, xg, yg, nlevels = 20, col = 'dodgerblue3', labcex = 1) +contour(ml, xg, yg, nlevels = 20, col = 'dodgerblue', labcex = 1) ) # For image() or filled.contour() diff --git a/man/flow_through_line.Rd b/man/flow_through_line.Rd index a7c9b0a..c16aab1 100644 --- a/man/flow_through_line.Rd +++ b/man/flow_through_line.Rd @@ -55,7 +55,7 @@ uf <- uniformflow(TR = 100, gradient = 0.001, angle = -45) m <- aem(k = 10, top = 10, base = 0, n = 0.2, rf, uf) xg <- seq(-500, 500, l=100); yg <- seq(-300, 300, l=100) -contours(m, xg, yg, col='dodgerblue3', nlevels=20) +contours(m, xg, yg, col='dodgerblue', nlevels=20) x0 <- -200 y0 <- -50 @@ -68,7 +68,7 @@ flow_through_line(m, x1, y1, x0, y0) # reverse direction of line w <- well(125, 200, 150) m <- aem(k = 10, top = 10, base = 0, n = 0.2, rf, uf, w) -contours(m, xg, yg, col='dodgerblue3', nlevels=20) +contours(m, xg, yg, col='dodgerblue', nlevels=20) lines(matrix(c(x0, y0, x1, y1), ncol = 2, byrow = TRUE)) flow_through_line(m, x0, y0, x1, y1, flow = 'darcy') diff --git a/man/tracelines.Rd b/man/tracelines.Rd index ba2c0ae..3641ca0 100644 --- a/man/tracelines.Rd +++ b/man/tracelines.Rd @@ -120,8 +120,8 @@ endp <- endpoints(paths) xg <- seq(-500, 500, length = 100) yg <- seq(-300, 300, length = 100) -contours(m, xg, yg, col = 'dodgerblue3', nlevels = 20) -plot(paths, add = TRUE, col = 'orange3') +contours(m, xg, yg, col = 'dodgerblue', nlevels = 20) +plot(paths, add = TRUE, col = 'orange') points(endp[, c('x', 'y')]) # Backward tracking with retardation; plot point marker every 5 years @@ -134,13 +134,13 @@ w2 <- well(-200, -100, Q = 450) ls <- headlinesink(x0 = -100, y0 = 100, x1 = 400, y1 = -300, hc = 7) m <- aem(k, top, base, n = n, uf, rf, w1, w2, ls) -contours(m, xg, yg, col = 'dodgerblue3', nlevels = 20) +contours(m, xg, yg, col = 'dodgerblue', nlevels = 20) plot(m, add = TRUE) x0 <- seq(-400, 400, 50); y0 <- 200 times <- seq(0, 5 * 365, 365 / 20) paths <- tracelines(m, x0 = x0, y0 = y0, z0 = top, times = times) -plot(paths, add = TRUE, col = 'orange3') +plot(paths, add = TRUE, col = 'orange') # User-defined termination in rectangular zone tzone <- cbind(x = c(-300, -200, -200, -300), y = c(150, 150, 100, 100)) @@ -152,10 +152,10 @@ termf <- function(t, coords, parms) { return(in_poly) } paths <- tracelines(m, x0 = x0, y0 = y0, z0 = top, times = times, tfunc = termf) -contours(m, xg, yg, col = 'dodgerblue3', nlevels = 20) +contours(m, xg, yg, col = 'dodgerblue', nlevels = 20) plot(m, add = TRUE) polygon(tzone) -plot(paths, add = TRUE, col = 'orange3') +plot(paths, add = TRUE, col = 'orange') # model with vertical flow due to area-sink as <- areasink(xc = 0, yc = 0, N = 0.001, R = 1500) @@ -164,21 +164,21 @@ m <- aem(k, top, base, n = n, uf, rf, w1, w2, as) # starting z0 locations are above aquifer top and will be reset to top with warning paths <- tracelines(m, x0 = x0, y0 = y0, z0 = top + 0.5, times = times) -contours(m, xg, yg, col = 'dodgerblue3', nlevels = 20) +contours(m, xg, yg, col = 'dodgerblue', nlevels = 20) plot(m, add = TRUE) -plot(paths, add = TRUE, col = 'orange3') +plot(paths, add = TRUE, col = 'orange') # plot vertical cross-section of traceline 4 along increasing y-axis (from south to north) plot(paths[[4]][,c('y', 'z')], type = 'l') # plot arrows -contours(m, xg, yg, col = 'dodgerblue3', nlevels = 20) -plot(paths, add = TRUE, col = 'orange3', arrows = TRUE, length = 0.05) +contours(m, xg, yg, col = 'dodgerblue', nlevels = 20) +plot(paths, add = TRUE, col = 'orange', arrows = TRUE, length = 0.05) # plot point markers every 2.5 years -contours(m, xg, yg, col = 'dodgerblue3', nlevels = 20) -plot(paths, add = TRUE, col = 'orange3', marker = 2.5 * 365, pch = 20) +contours(m, xg, yg, col = 'dodgerblue', nlevels = 20) +plot(paths, add = TRUE, col = 'orange', marker = 2.5 * 365, pch = 20) # plot point markers every 600 days plot(paths, add = TRUE, col = 'forestgreen', marker = 600, pch = 1)