trendTicks {GCDkit} | R Documentation |
Adding a trend with arrow and tick marks to a pre-existing GCDkit plot.
trendTicks(equation, x, xmin = par("usr")[1], xmax = par("usr")[2], text = FALSE, col = "blue", lty = "solid", lwd = 1, arrow = FALSE, autoscale = TRUE)
equation |
character or expression; a valid formula expressed as a function of |
x |
numeric; x values where the ticks are to be drawn. |
xmin |
numeric; beginning of the trend. |
xmax |
numeric; end of the trend. |
text |
logical; should be the tick marks annotated by text? |
col |
text or numeric; plotting colour specification. |
lty |
text or numeric; the line type. |
lwd |
numeric; the line width, a positive number, defaulting to 1. |
arrow |
logical; should be also an arrow head shown? |
autoscale |
logical; should the plot be autosized in order to accommodate the whole trend as well as all data points? |
Using the function curve
, the function trendTicks
adds to an existing GCDkit plot
a linear or curved trend with tick marks and (optionally) arrow head. It is required that the trend
is defined as a function of x
. The slope of the individual tick marks is then determined using
a derivation of the main function at the respective points.
|
a list with two components, |
Autoscaling will work only with Figaro compatible plots!
Vojtech Janousek, vojtech.janousek@geology.cz
binary("Ba","Sr",xmin=200,xmax=2000,ymin=10,ymax=400) equation<-"x/8+200" x<-seq(2000,500,by=-100) trendTicks(equation,x,min(x),max(x),col="darkred",lty="solid",lwd=2,arrow=T,text=F) plot(1,1,type="n",xlim=c(0.01,1),ylim=c(0,1),xlab="Rb",ylab="Sr",log="x") equation<-"6*x/8" x<-seq(0.01,1,by=0.1) trendTicks(equation,x,min(x),max(x),col=2,lwd=2,arrow=F,text=F,autoscale=F)