Description Usage Arguments Details See Also Examples
View source: R/plot_text_calls.R
post
plots 1 or more text strings (provided as a character vector labels
)
to an (existing or new) xbox
.
1 2 3 4 5 6 7 8 9 10 11 |
labels |
A character vector specifying the text labels to be plotted. |
x |
A numeric vector of x-coordinates at which the
text labels in |
y |
A numeric vector of y-coordinates at which the
text labels in |
y_layout |
A numeric value or vector for the vertical
spacing of labels in |
col |
The color(s) of the text label(s).
Default: |
col_bg |
The background color(s) of the |
cex |
Numeric character expansion factor(s),
multiplied by |
font |
The font type(s) to be used.
Default: |
new_plot |
Should a new plot be generated?
Set to |
The positions of the text elements in labels
can be specified by
providing their coordinates (as x
and y
arguments) or
by providing an initial position and an y_layout
(see below).
Text formatting parameters (like col
, col_bg
, cex
, font
)
are recycled to match length(labels)
.
post
uses the base graphics system graphics::
.
xbox
to create a new xbox (without text).
Other text functions:
mark()
,
uline()
,
url_unikn()
1 2 3 4 5 6 7 8 9 10 11 12 13 | post(labels = "Post this line with default settings.", new_plot = "xbox")
# Create a new xbox:
post(labels = "This is a test.", new_plot = "xbox",
cex = 1.2, font = 2, col_bg = pal_seeblau[[5]])
# Add text to an existing xbox:
post(labels = c("More text follows here,",
"yet another line here,",
"and even more here."),
y = .4, y_layout = .04,
new_plot = "none")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.