View source: R/geom-series-circles.R
GeomSeriesText | R Documentation |
geom_series_text
is designed to be used in concert with geom_series_circles.
It renders the label
mapping to the final position of the series of circles sequence.
There are three arguments absolutely needed in aes()
mappings:
x
A vector mapping the abscissa axis x
, i.e. a character vector
when x
is a numerical vector, or a numerical vector when y
is a character
vector.
y
A vector mapping the ordinate axis y
, i.e. a numerical vector
when x
is a character vector or vice versa.
label
Labels.
GeomSeriesText
geom_series_text(
mapping = NULL,
data = NULL,
position = "identity",
show.legend = NA,
na.rm = FALSE,
inherit.aes = TRUE,
...
)
mapping |
Set of aesthetic mappings created by |
data |
The data to be displayed in this layer. There are three options: If A A |
position |
Position adjustment, either as a string, or the result of
a call to a position adjustment function. Cannot be jointly specified with
|
show.legend |
logical. Should this layer be included in the legends?
|
na.rm |
If |
inherit.aes |
If |
... |
Other arguments passed on to |
An object of class GeomSeriesText
(inherits from GeomText
, Geom
, ggproto
, gg
) of length 1.
A ggplot2 layer.
my_df <- data.frame(cat = c("Apple", "Banana", "Pineapple"), val = c(2.65, 4.5, 6.25))
my_df |>
ggplot2::ggplot() +
geom_series_circles(ggplot2::aes(cat, val)) +
geom_series_text(ggplot2::aes(cat, val, label = cat)) +
ggplot2::coord_equal()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.