hasLegend-methods: Accessor method for the legend indicator (slot "haslegend")...

Description Usage Arguments Value Examples

Description

Get whether or not a plot or PlotFeatureSet.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
hasLegend(object)

## S4 method for signature 'PlotFeatureSet'
hasLegend(object)

## S4 method for signature 'ggplot'
hasLegend(object)

## S4 method for signature 'trellis'
hasLegend(object)

## S4 method for signature 'gTree'
hasLegend(object)

## S4 method for signature 'PlotFeatureSet'
hasLegend(object)

Arguments

object

An object of class PlotFeatureSet, GGplotFeatureSet, TrellisFeatureSet, ggplot, or trellis.

Value

A boolean indicating whether or not a legend is displayed in the plot.

Examples

1
2
3
4
5
library(ggplot2)
mt = datasets::mtcars
plt = qplot(mt$mpg, mt$cyl)
fs = makeFeatureSet(plt)
hasLegend(fs)

gmbecker/recordr documentation built on May 24, 2021, 10:59 a.m.