library(oce)
# Flow from a point source
n <- 16
x <- rep(0, n)
y <- rep(0, n)
theta <- seq(0, 2*pi, length.out=n)
u <- sin(theta)
v <- cos(theta)
oce.plot.sticks(x, y, u, v, xlim=c(-2, 2), ylim=c(-2, 2))
rm(n, x, y, theta, u, v)
# Oceanographic example
data(airHalifax)
attach(airHalifax)
oce.plot.ts(t, temperature, type='l', ylim=c(0,25), ylab=resizableLabel("T"))
oce.plot.sticks(t, rep(5, length(u)), u, v, yscale=2, add=TRUE)
legend("bottomright", legend="Velocity scale: 2 m/s per degC", bg="white")
detach(airHalifax)
Run the code above in your browser using DataLab