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

triax.fill

Triangle plot fill


Description

Fill a triangle plot with smaller triangles.

Usage

triax.fill(col)

Arguments

col

List of colors (see Details).

Details

In order for triax.fill to fill an existing plot that has been created by a call to triax.plot, the user must supply a list of fill colors. The first element of the list must begin with at least one value that can be interpreted as a color. The second element must begin with at least three such values, and so on, adding two values for each element of the list. Each list element will be displayed as a row of colored triangles starting at the top of the plot. The number of elements in the list determines the number of rows that will be displayed.

Value

nil

Author(s)

Jim Lemon

See Also

Examples

# the data will be something like response at different proportions
 fillval<-list(0,c(0,0.1,0),c(0,0.1,0.2,0.1,0),
  c(0,0.1,0.2,0.3,0.2,0.1,0),c(0,0.1,0.2,0.3,0.4,0.3,0.2,0.1,0),
  c(0,0.1,0.2,0.3,0.4,0.5,0.4,0.3,0.2,0.1,0),
  c(0,0,0.1,0.2,0.3,0.4,0.5,0.4,0.3,0.2,0.1,0,0),
  c(0,0,0,0.1,0.1,0.2,0.3,0.4,0.3,0.2,0.1,0.1,0,0,0))
 # use some method of converting values to colors
 fillcol<-sapply(fillval,function(x) {x*10+1} )
 oldpar<-triax.plot(main="Test of triax.fill function")
 triax.fill(fillcol)
 par(oldpar)

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.