plotProfile | R Documentation |
Plots the depth/altitude along a transect or path
plotProfile(profile,shadow=TRUE,xlim,ylim,col.sea,col.bottom,xlab,ylab, ...)
profile |
4-columns matrix obtained from |
shadow |
logical. Should the depth profile cast a shadow over the plot background? |
xlim, ylim |
numeric vectors of length 2, giving the x and y coordinates ranges. If unspecified, |
col.sea |
color for the sea area of the plot. Defaults to |
col.bottom |
color for the bottom area of the plot. Defaults to |
xlab, ylab |
titles for the x and y axes. If unspecified, |
... |
arguments to be passed to methods, such as graphical parameters (see |
a bivariate plot of depth against the kilometric distance from the starting point of a transect or least cost path.
path.profile
with argument plot
set to TRUE
plots depth profiles with default values for all arguments of plotProfile
.
Benoit Simon-Bouhet
path.profile
, plot.bathy
# Example 1:
data(celt)
layout(matrix(1:2,nc=1),height=c(2,1))
par(mar=c(4,4,1,1))
plot(celt,n=40,draw=TRUE)
points(c(-6.34,-5.52),c(52.14,50.29),type="o",col=2)
tr <- get.transect(celt, x1 = -6.34, y1 = 52.14, x2 = -5.52, y2 = 50.29, distance = TRUE)
plotProfile(tr)
# Example 2:
layout(matrix(1:2,nc=1),height=c(2,1))
par(mar=c(4,4,1,1))
plot(celt,n=40,draw=TRUE)
points(c(-5,-6.34),c(49.8,52.14),type="o",col=2)
tr2 <- get.transect(celt, x1 = -5, y1 = 49.8, x2 = -6.34, y2 = 52.14, distance = TRUE)
plotProfile(tr2)
# Example 3: click several times on the map and press ESC
## Not run:
layout(matrix(1:2,nc=1),height=c(2,1))
par(mar=c(4,4,1,1))
data(florida)
plot(florida,image=TRUE,dra=TRUE,land=TRUE,n=40)
out <- path.profile(as.data.frame(locator(type="o",col=2,pch=19,cex=.8)),florida)
plotProfile(out)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.