Learn R Programming

gghighlight (version 0.1.0)

gghighlight-old: Highlight Data With Predicate

Description

gghiglight_line() and gghighlight_point() are deprecated. Please use gghighlight() instead.

Usage

gghighlight_line(data, mapping, predicate, max_highlight = 5L,
  unhighlighted_colour = ggplot2::alpha("grey", 0.7), use_group_by = TRUE,
  use_direct_label = TRUE, label_key = NULL, ...,
  environment = parent.frame())

gghighlight_point(data, mapping, predicate, max_highlight = 5L, unhighlighted_colour = ggplot2::alpha("grey", 0.7), use_group_by = FALSE, use_direct_label = TRUE, label_key = NULL, ..., environment = parent.frame())

Arguments

data

Default dataset to use for plot. If not already a data.frame, will be converted to one by fortify(). If not specified, must be supplied in each layer added to the plot.

mapping

Default list of aesthetic mappings to use for plot. If not specified, must be supplied in each layer added to the plot.

predicate

Expression to filter data, which is passed to dplyr::filter().

max_highlight

Max number of series to highlight.

unhighlighted_colour

Colour for unhighlighted lines/points.

use_group_by

If TRUE, use dplyr::group_by() to evaluate predicate.

use_direct_label

If TRUE, add labels directly on the plot instead of using a legend.

label_key

Column name for label aesthetics.

...

Arguments passed to the corresponding geometry functions (e.g. geom_line()).

environment

DEPRECATED. Used prior to tidy evaluation.