Describe: Describe method to help visualize plot types.

View source: R/Describe.R

DescribeR Documentation

Describe method to help visualize plot types.

Description

A function to help describe what a graph model would look like, to a vision impaired person.

Usage

Describe(x, VI=FALSE, ...)

## S3 method for class 'histogram'
Describe(x, VI=FALSE, ...)

## S3 method for class 'ggplot'
Describe(x,VI=FALSE, whichLayer=NULL, ...)

Arguments

x

any R object

VI

Should VI() be called at the same time

whichLayer

Only used with Describe.ggplot, if NULL will either display the layer if ggplot has one layer, ask user for input if it is an interactive session or print out all of the layers

...

other arguments, currently ignored

Details

Describe() is for explaining how a given type of graph appears to a sighted person and is intended for use by blind people who do not know how the graph looks. There is room to add hints for displaying the graphs in a more visually appealing manner.

The text description will only be generic to the plot type and not specific information for specific information see VI().

Unlike VI() and ggplot Describe needs to be explicitly called to show its output.

Value

A description in the format of a list. It will have the title, general info and RHints. If multiple layers of a ggplot are being described then it will be a list of descriptions for each layer.

Author(s)

A. Jonathan R. Godfrey and James A. Thompson

Examples

# Base R
scatter = FittedLinePlot(NULL, x = rnorm(1e2), y = rnorm(1e2))
Describe(scatter)
hist = hist(rnorm(1e3))
Describe(hist)

# ggplot
if(require(ggplot2)){
simplePoint = ggplot(NULL, aes(rnorm(1e2), rnorm(1e2))) +
  geom_point()
Describe(simplePoint)
}

BrailleR documentation built on July 26, 2023, 5:46 p.m.