minimap: DEM plotting function

Description Usage Arguments Value Author(s) Examples

View source: R/minimap.R

Description

Plots DEM as (small inset) map with desired stations highlighted

Usage

1
2
3
4
5
minimap(name, x1 = 0.1, x2 = x1 + 0.2, y1 = 0.7, y2 = y1 + 0.27,
  spargs = NULL, ...)

plotmap(name, metadf = meta, pch = 3, lwd = 3, col = "red",
  allargs = NULL, expr = NULL, label = FALSE, ...)

Arguments

name

Station name(s) to be plotted with red crosses

x1, x2, y1, y2

Relative location of minimap

spargs

List of arguments passed to smallPlot. DEFAULT: NULL

...

Further arguments passed from minimap to plotmap and then to points

metadf

Dataframe with metadata. DEFAULT: meta

pch, lwd, col

Point properties

allargs

List of arguments passed to all gauge locations first

expr

Expression to be executed after points, see example. DEFAULT: NULL

label

Logical (vector): Label gauges? DEFAULT: FALSE

Value

None

Author(s)

Berry Boessenkool, berry-b@gmx.de, Jun 2017

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
plotmap("Koeln") ; axis(1) ; axis(2)
plotmap(c("Rees","Mainz","Worms","Seifen"), label=TRUE, col=1:4)
plot(1:10)
minimap("Koeln")
minimap(0) # no stations
minimap("Cochem", allargs=list(pch=3,cex=0.5))

stats <- gnames("app")[c(1,5,8,12)]
minimap(stats, expr=text(meta[name,"lon"], meta[name,"lat"], name, col=2, adj=c(0,1)))

op <- par(mfrow=c(2,2))
plot(1:10)
plot(1:10)
plot(1:10)
minimap("Koeln")
minimap("Mainz", spargs=list(outer=TRUE))
par(op)

pdf("test.pdf", height=5)
hist(rnorm(100))
minimap(c("Koeln","Rheinfelden"), y1=0.1, y2=0.9, x2=0.9)
minimap() # all dots
dev.off()
#berryFunctions::openFile("test.pdf")
unlink("test.pdf")

brry/rfs documentation built on May 24, 2019, 3:05 a.m.