addWindBarbs2: Add wind barbs to a timeseries plot

View source: R/addWindBarbs2.R

addWindBarbs2R Documentation

Add wind barbs to a timeseries plot

Description

Add a multi-sided polygon to a plot.

Usage

addWindBarbs2(
  x,
  y,
  speed,
  dir,
  extraBarbLength = 0,
  barbSize = 1,
  barbColor = "blue",
  barbLocation = "zero",
  ...
)

Arguments

x

vector of x-axis positions

y

vector of y-axis positions

speed

vector of wind speeds in knots

dir

wind directions in degrees clockwise from north

extraBarbLength

add length to barbs

barbSize

size of the barb s

barbColor

color of the barbs

barbLocation

starting location for barbs. Currently accepts 'point' or 'zero'

...

additional arguments to be passed to arrows

References

https://commons.wikimedia.org/wiki/Wind_speed

Examples


library(RAWSmet)

data <-
  example_cefa_Saddle_Mountain %>%
  raws_filterDate("2017-09-01", "2017-10-01") %>%
  raws_getData()

plot(data$datetime, data$windSpeed)
addWindBarbs2(data$datetime, data$windSpeed, data$windSpeed, data$windDirection)



MazamaScience/RAWSmet documentation built on May 6, 2023, 6:57 a.m.