Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

plot.symbolmap

Plot a Graphics Symbol Map


Description

Plot a representation of a graphics symbol map, similar to a plot legend.

Usage

## S3 method for class 'symbolmap'
plot(x, ..., main, xlim = NULL, ylim = NULL,
                         vertical = FALSE,
                         side = c("bottom", "left", "top", "right"),
                         annotate = TRUE, labelmap = NULL, add = FALSE,
                         nsymbols = NULL)

Arguments

x

Graphics symbol map (object of class "symbolmap").

...

Additional graphics arguments passed to points, symbols or axis.

main

Main title for the plot. A character string.

xlim,ylim

Coordinate limits for the plot. Numeric vectors of length 2.

vertical

Logical. Whether to plot the symbol map in a vertical orientation.

side

Character string specifying the position of the text that annotates the symbols.

annotate

Logical. Whether to annotate the symbols with labels.

labelmap

Transformation of the labels. A function or a scale factor which will be applied to the data values corresponding to the plotted symbols.

add

Logical value indicating whether to add the plot to the current plot (add=TRUE) or to initialise a new plot.

nsymbols

Optional. The number of symbols that should be displayed. (This may not be exactly obeyed.)

Details

A graphics symbol map is an association between data values and graphical symbols.

This command plots the graphics symbol map itself, in the style of a plot legend.

Value

None.

Author(s)

Adrian Baddeley Adrian.Baddeley@curtin.edu.au, Rolf Turner r.turner@auckland.ac.nz and Ege Rubak rubak@math.aau.dk.

See Also

symbolmap to create a symbol map.

invoke.symbolmap to apply the symbol map to some data and plot the resulting symbols.

Examples

g <- symbolmap(inputs=letters[1:10], pch=11:20)
  plot(g)

  g2 <- symbolmap(range=c(-1,1),
                    shape=function(x) ifelse(x > 0, "circles", "squares"),
                    size=function(x) sqrt(ifelse(x > 0, x/pi, -x)),
                    bg = function(x) ifelse(abs(x) < 1, "red", "black"))
  plot(g2, vertical=TRUE, side="left", col.axis="blue", cex.axis=2)

spatstat.geom

Geometrical Functionality of the 'spatstat' Family

v2.1-0
GPL (>= 2)
Authors
Adrian Baddeley [aut, cre], Rolf Turner [aut], Ege Rubak [aut], Tilman Davies [ctb], Ute Hahn [ctb], Abdollah Jalilian [ctb], Sebastian Meyer [ctb], Suman Rakshit [ctb], Dominic Schuhmacher [ctb], Rasmus Waagepetersen [ctb]
Initial release
2021-04-15

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.