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

rectFill

Draw a rectangle filled with symbols


Description

Draws a rectangle on the current figure filled with arbitrary symbols.

Usage

rectFill(x1,y1,x2,y2,fg=par("fg"),bg=par("bg"),xinc=NA,yinc=NA,
  pch=1,pch.cex=1,pch.col=par("fg"),...)

Arguments

x1,y1,x2,y2

Rectangle limits as in rect.

fg

Foreground color

bg

Background color

xinc,yinc

The x and y increments of spacing for the symbols.

pch

Which symbol to use

pch.cex

Character expansion for the symbols.

pch.col

Color(s) for the symbols.

...

Additional arguments to points for the symbols.

Details

rectFill draws a rectangle and fills the rectangle with the symbols requested. It is probably most useful as a substitute for fill colors in a black and white environment.

Value

nil

Author(s)

Jim Lemon

See Also

Examples

plot(1:7,type="n",xlab="",ylab="",main="Test of rectFill")
 rectFill(1:6,1:6,2:7,2:7,bg=2:7,pch=c("+","*","o",".","#","^"),
  xinc=c(0.2,0.1,0.2,0.1,0.2,0.2),yinc=c(0.2,0.1,0.2,0.1,0.2,0.2),
  pch.col=1:6)
 barp(matrix(runif(9),nrow=3),main="Black and white bar plot",pch=1:3)

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.