suppress_aes_text_warning: Suppress ggplot2 warning when using text aesthetic for plotly

Description Usage Arguments Examples

View source: R/suppress_aes_text_warning.R

Description

Suppresses unknown aesthetic warning when providing a text aesthetic. Intended for cosmetic purposes when printing as a ggplot object. Unnecessary, if converting to plotly for use as hovertext with ggplotly().

Usage

1

Arguments

ggplot_obj

a ggplot object, see ggplot

Examples

1
2
3
4
5
6
7
8
9
requireNamespace("ggplot2", quietly = TRUE)

g <- ggplot2::ggplot(iris) +
    ggplot2::geom_point(
        ggplot2::aes(x = Sepal.Length, y = Sepal.Width, text = Species)
    )
g

suppress_aes_text_warning(g)

allenbaron/JABmisc documentation built on July 4, 2021, 9:56 a.m.