legend_mtext: Write marginal text

legend_mtextR Documentation

Write marginal text

Description

Functions write text outside of maps panels. legend_mtext (without prefix dot) is a wrapper for non-public .legend_mtext (with prefix dot).

Usage

legend_mtext(...)

## non-public
.legend_mtext(text = "Annotation", cex = 1)

Arguments

...

Set of arguments, which are recognized via their names (using regular expressions) and classes. Passed to non-public .legend_mtext, excepting argument mtext:

mtext

Prefix for indirect use (e.g., in compose_legend). Separated by a dot ".", e.g., mtext.cex=0.85.

Matched pattern (legend_colorbar) Argument (.legend_colorbar) Description
mtext Prefix for indirect use (e.g., in compose_legend). Separated by a dot ".", e.g., mtext.cex=0.85.
text text See below.
cex cex See below.
text

Argument of class character or expression with matching name "text" (or without name) in legend_mtext. Text, which is displayed. If character then text is displayed in bold. Default is "Title/subtitle".

cex

Argument of class numeric with matching name "cex" in legend_mtext. A numerical value giving the amount by which labels should be magnified relative to the default. Default is 1.

Details

If text is expression, then possible way for formatting is:

text=as.expression(substitute(bold(italic("Omega powered by alpha is ",Omega^alpha))))

Value

Returned value of function mtext from package graphics.

Author(s)

Nikita Platonov platonov@sevin.ru

See Also

compose_legend
legend_colorbar

Examples

session_grid(NULL)
a <- ursa_dummy(1,min=-10,max=+30)
compose_open(legend=list("right","top","bottom","left"))
panel_new()
ct <- panel_raster(a)
legend_colorbar(ct)#,units=as.expression(substitute(bold(degree*C))))
legend_mtext("Characters are in bold")
legend_mtext(as.expression(substitute(italic(
            paste("Units can be interpreted as",~degree*C)))),cex=0.7)
legend_mtext(text=as.expression(substitute(italic(paste("Omega powered by alpha is"
                                                       ,~~Omega^alpha)))))
compose_close(execute=!FALSE)

nplatonov/ursa documentation built on May 8, 2024, 6:02 p.m.