Functions write text outside of maps panels. legend_mtext (without prefix dot) is a wrapper for non-public .legend_mtext (with prefix dot).
legend_mtext(...)## non-public
.legend_mtext(text = "Annotation", cex = 1)
Set of arguments, which are recognized via their names (using regular expressions) and classes. Passed to non-public .legend_mtext, excepting argument mtext:
mtextPrefix 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. |
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".
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.
Returned value of function mtext from package graphics.
If text is expression, then possible way for formatting is:
text=as.expression(substitute(bold(italic("Omega powered by alpha is ",Omega^alpha))))# NOT RUN {
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)
# }
Run the code above in your browser using DataLab