util.legend: Functions to Make Legend Text

Description Usage Arguments Details See Also Examples

Description

Generate expressions suitable plot legends describing system conditions.

Usage

1
2
3
4
5
6
  lNaCl(x, digits = 2)
  lS(x, digits = 3)
  lT(x, digits = 0)
  lP(x, digits = 0)
  lTP(x, y, digits = 0)
  lex(...)

Arguments

x

numeric, value of the property

digits

numeric, digits for rounding

y

numeric, value of pressure

...

language, objects to combine in an expression

Details

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.

See Also

util.expression

Examples

1
2
3
plot.new()
l <- lex(lTP(100, "Psat"), lNaCl(1), lS(1e-3))
legend("center", l)

CHNOSZ documentation built on July 7, 2020, 3 p.m.