geom_grid_*()
geoms draw grid line of constant psychrometric properties,
including relative humidity, wet-bulb temperature, water vapor pressure,
specific volume and enthalpy, based on current psychrometric chart's dry-bulb
temperature range and humidity ratio range.
geom_grid_relhum( mapping = NULL, data = NULL, n = 201, label_loc = 0.95, label_parse = FALSE, units = waiver(), pres = waiver(), ..., na.rm = FALSE ) geom_grid_wetbulb( mapping = NULL, data = NULL, label_loc = 0.1, label_parse = TRUE, units = waiver(), pres = waiver(), ..., na.rm = FALSE ) geom_grid_vappres( mapping = NULL, data = NULL, label_loc = 0.5, label_parse = FALSE, units = waiver(), pres = waiver(), ..., na.rm = FALSE ) geom_grid_specvol( mapping = NULL, data = NULL, label_loc = 0.95, label_parse = TRUE, units = waiver(), pres = waiver(), ..., na.rm = FALSE ) geom_grid_enthalpy( mapping = NULL, data = NULL, label_loc = 0.95, label_parse = TRUE, units = waiver(), pres = waiver(), ..., 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 |
n | Number of points to interpolate along. Only used in
|
label_loc | A single number in range (0, 1) indicating label position relative to the line. The default values aim to reduce overlappings among differnent psychrometric property lines, but you can change them if needed:
|
label_parse | If |
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 |
... | Other arguments passed on to |
na.rm | If |
geom_grid_relhum()
for relative humidity grid in range [0, 100] in %
geom_grid_wetbulb()
for wet-bulb temperature grid in degree_F [IP] or degree_C [SI]
geom_grid_vappres()
for partial pressure grid of water vapor in Psi [IP]
or Pa [SI]
geom_grid_specvol()
for specific volume grid in ft3 lb-1 of dry air [IP] or
in m3 kg-1 of dry air [SI]
geom_grid_enthalpy()
for moist air enthalpy grid in Btu lb-1 [IP] or kJ kg-1
Each geom_grid_*()
comes along with a corresponding
scale_*()
function for customizing scale
properties, including breaks, labels and etc.
For each psychrometric properties, the maximum and minimum value is calculated based on the ranges of dry-bulb temperature and humidity ratio in the coordinate system.
You can modify text alignment with the vjust
and hjust
aesthetics. These can either be a number between 0 (right/bottom) and
1 (top/left) or a character ("left"
, "middle"
, "right"
, "bottom"
,
"center"
, "top"
). There are two special alignments: "inward"
and
"outward"
. Inward always aligns text towards the center, and outward
aligns it away from the center.
geom_grid_*()
understands the following aesthetics.
color
size
linetype
alpha
label.colour
label.size
label.angle
label.hjust
label.vjust
label.alpha
label.family
label.fontface
label.lineheight
# add all grid components ggpsychro() + geom_grid_relhum() + geom_grid_wetbulb() + geom_grid_vappres() + geom_grid_specvol() + geom_grid_enthalpy()# custom grid style ggpsychro() + geom_grid_relhum(alpha = 1.0, label.alpha = 1.0, label.size = 6, label.fontface = 2) + geom_grid_wetbulb(size = 1.0, color = "black", alpha = 1.0, label_loc = NA) + geom_grid_vappres(label.size = 5)