radarplot {colourvision}R Documentation

Radar plot

Description

Plots quantum catches or E-values (photoreceptor outputs) into a radar plot.

Usage

radarplot(model, item=c("Qr", "E"), item.labels=FALSE, item.lwd=1,
           border=NULL, radar.lwd=1, radar.col="grey",
           length="auto", xlim="auto", ylim="auto",
           xlab="", ylab="", asp=1, add = FALSE, ...)

Arguments

model

Output of a colour vision model.

item

Whether photoreceptor inputs (Qr) or outputs (E) should be plotted.

item.labels

Logical. Whether vector names should be plotted.

item.lwd

Width of lines connecting item values.

border

Colour of lines connecting item values. See polygon.

radar.lwd

Width of lines representing item vectors.

radar.col

Colour of lines representing item vectors.

length

Length of item vectors. Default calculates length automatically.

xlim

x-axis range. Default calculates range automatically. See plot function.

ylim

y-axis range. Default calculates range automatically. See plot function.

xlab

see par function.

ylab

see par function.

asp

see par function.

add

Logical. Whether data should be added to an existing plot.

...

Other arguments passed to plot.

Author(s)

Felipe M. Gawryszewski f.gawry@gmail.com

Examples

##Photoreceptor sensitivity curves
##with lambda max at 350nm, 450nm and 550nm:
C<-photor(lambda.max=c(350,450,550))

## Grey background
## with 10 percent reflectance from 300 to 700nm:
Rb <- data.frame(300:700, rep(10, length(300:700)))

## Read CIE D65 standard illuminant
data("D65")

## Reflectance data
## with a sigmoid spectrum and midpoint at 500nm
R1<-logistic(x=seq(300,700,1), x0=450, L=50, k=0.04)
R2<-logistic(x=seq(300,700,1), x0=500, L=50, k=0.04)
R3<-logistic(x=seq(300,700,1), x0=550, L=50, k=0.04)
R<-cbind(R1,R2[,2],R3[,2])

## Run model 
model<-CTTKmodel(photo=3, R=R, I=D65,
    Rb=Rb, C=C)

#Radarplot
radarplot(model, border=c("violet", "red", "blue"), item="E", item.labels=TRUE)

[Package colourvision version 2.0.4 Index]