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

ruginv

Add an Inverse Rug to a Plot


Description

Adds a rug representation (1D plot) of the data to the plot, but with the coloring inverted.

Usage

ruginv(x,ticksize=0.03,side=1,lwd=0.5,col=par("fg"),col.ticks="white",
 quiet=getOption("warn") < 0,...)

Arguments

x

A numeric vector.

ticksize

The length of the ticks making up the 'rug'. Positive lengths produce inward ticks.

side

On which side of the plot box the rug will appear. Usually 1 (bottom) or 3 (top).

lwd

The line width of the ticks.

col

Color of the background of the ticks.

col.ticks

The color of the ticks.

quiet

Logical indicating if there should be a warning about clipped values.

...

Further arguments passed to polygon when plotting the background for the ticks.

Author(s)

Peter Solymos

See Also

Examples

require(stats)
 plot(density(faithful$eruptions,bw=0.15))
 ruginv(faithful$eruptions,ticksize=-0.05)
 ruginv(jitter(faithful$eruptions,amount=0.01),side=3,col="lightblue")

plotrix

Various Plotting Functions

v3.8-1
GPL (>= 2)
Authors
Jim Lemon, Ben Bolker, Sander Oom, Eduardo Klein, Barry Rowlingson, Hadley Wickham, Anupam Tyagi, Olivier Eterradossi, Gabor Grothendieck, Michael Toews, John Kane, Rolf Turner, Carl Witthoft, Julian Stander, Thomas Petzoldt, Remko Duursma, Elisa Biancotto, Ofir Levy, Christophe Dutang, Peter Solymos, Robby Engelmann, Michael Hecker, Felix Steinbeck, Hans Borchers, Henrik Singmann, Ted Toal, Derek Ogle, Darshan Baral, Ulrike Groemping, Bill Venables
Initial release
2021-01-21

We don't support your browser anymore

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