geom_maskarea()
draws a polygon to mask all area outside of the saturation
line. The vertices of polygon are based on current psychrometric chart's
dry-bulb temperature (x axis) range and humidity ratio (y axis) range.
geom_maskarea( mapping = NULL, data = NULL, units = waiver(), pres = waiver(), n = 201, ..., na.rm = FALSE )
mapping | Set of aesthetic mappings created by |
---|---|
data | The data to be displayed in this layer. There are three options: If A A |
units | A single string indicating the units sytem to use. Should be
either |
pres | A single number indicating the atmosphere pressure in Pa [SI] or
Psi [IP]. If |
n | Number of points to interpolate along |
... | Other arguments passed on to |
na.rm | If |
geom_maskarea()
is based on ggplot2::geom_polygon()
, so you can further
customize the area style in the same way.
Normally there is no need to add another mask since ggpsychro()
calls geom_maskarea()
internally and makes sure that it is always rendered
after other layers.
geom_maskarea()
understands the following aesthetics (required aesthetics
are in bold).
color
size
linetype
# by default, a mask is automatically added when calling 'ggpsychro()' function ggpsychro()# replace with another mask area for pressure at 102000 ggpsychro() + geom_maskarea(units = "SI", pres = 102000)# the line style can be further customized like 'ggplot2::geom_line()' ggpsychro() + geom_maskarea(units = "SI", pres = 101325, color = "blue", fill = "green")