util.legend {CHNOSZ} | R Documentation |
Generate expressions describing system conditions that can be added to legends of plots.
lNaCl(x, digits = 2)
lS(x, digits = 3)
lT(x, digits = 0)
lP(x, digits = 0)
lTP(x, y, digits = 0)
lex(...)
x |
numeric, value of the property |
digits |
numeric, digits for rounding |
y |
numeric, value of pressure |
... |
language, objects to combine in an expression |
These functions are used to make expressions for common chemical system variables that can be used in plot legends.
lNaCl
describe the molality of NaCl, and lS
the total molality of sulfur.
lT
and lP
describe the temperature and pressure.
lTP
describe the temperature and pressure together, separated by a comma.
The above functions return language objects, which can be combined with lex
to make an expression that when used in legend
appears on multiple lines.
plot.new()
l <- lex(lTP(100, "Psat"), lNaCl(1), lS(1e-3))
legend("center", l)