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

symbolbox

Draw a box filled with symbols


Description

Draws a box on the current figure that is filled with symbols representing individual counts

Usage

symbolbox(x1,y1,x2,y2,tot,relw=0.5,fg=par("fg"),bg=par("bg"),box=TRUE,
  debug = TRUE,...)

Arguments

x1

left side of box

y1

bottom side of box

x2

right side of box

y2

top side of box

tot

total number of symbols to put in the box

relw

relative width (relative to height) of symbols

fg

foreground color

bg

background color

box

(logical) draw box border?

debug

debug output?

...

additional arguments to polygon() for drawing box

Details

tries to automatically figure out appropriate scaling to fit symbols into the box

Value

none; draws on the current figure

Author(s)

Ben Bolker

See Also

Examples

plot(1:10,1:10,type="n")
 symbolbox(2,5,3,7,tot=20)
 symbolbox(6,2,10,6,tot=50,fg="blue",bg="magenta")

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.