RPMG (version 2.2-3)

rowBUTTONS: Geometry for the Really Poor Man's GUI

Description

Create a set of buttons and associated geometry for RPMG

Usage

rowBUTTONS(labs, col = 6, pch = 4, cex=1, boxsize = -1)

Value

The function returns a list of buttons and the associated geometry.

N

Number of Buttons

labs

Names of the Buttons

x1

vector of left x-coordinates for the buttons

x2

vector of right x-coordinates for the buttons

y1

vector of top y-coordinates for the buttons

y2

vector of bottom y-coordinates for the buttons

Arguments

labs

Vector of labels for the buttons running across the top and bottom of the plot

col

Optional vector of colors for the buttons

pch

Optional vector of symbols to be plotted in the center of the buttons

cex

optional character expansion for text

boxsize

optional box size for the buttons, default=-1 where the size is adjusted for string size

Author

Jake Anderson and Jonathan M. Lees<jonathan.lees@unc.edu>

Details

rowBUTTONS is called after the R graphic has been created so the geometry of the buttons can be set. Subsequent calls to whichbutt use the geometry to determine which button has been selected. Some of the parameters chosen here are controlled by par-like parameters.

See Also

whichbutt, par

Examples

Run this code

#######  create a plot
plot(c(0,1), c(0,1))
#######  set the character vector of button labels
mybutts = c("DONE", "REFRESH", "rainbow", "topo", "terrain", "CONT",
"XSEC","PS" )
#########  set colors and plotting chars for buttons
colabs = rep(1, length=length(mybutts))
pchlabs = rep(0,length(mybutts))
#######  create and set geometry for buttons:
buttons = rowBUTTONS(mybutts, col=colabs, pch=pchlabs)

Run the code above in your browser using DataCamp Workspace