plot.fittedloop | R Documentation |
A scatterplot of x and y fitted with an ellipse or hysteresis loop. Uses objects created by fel
, summary.ellipsefit
and floop
. Can also plot an ellipsefitlist
or ellipsesummarylist
object that contains multiple ellipses.
## S3 method for class 'ellipsefit'
plot(x,putNumber=FALSE,values=NULL,
xlim=NULL,ylim=NULL,main=NULL,newPred=TRUE,show=NULL,split.line=FALSE,...)
## S3 method for class 'ellipsesummary'
plot(x,putNumber=FALSE,values=NULL,
xlim=NULL,ylim=NULL,main=NULL,newPred=TRUE,split.line=FALSE,...)
## S3 method for class 'ellipsefitlist'
plot(x,main=NULL, values=NULL, ...)
## S3 method for class 'ellipsesummarylist'
plot(x,main=NULL, values=NULL, ...)
## S3 method for class 'fittedloop'
plot(x,split.line=TRUE,xlim=NULL,
ylim=NULL,putNumber=FALSE,values=NULL,main=NULL,show=NULL,...)
## S3 method for class 'loopsummary'
plot(x,split.line=TRUE,xlim=NULL,
ylim=NULL,putNumber=FALSE,values=NULL,main=NULL,...)
## S3 method for class 'fittedlooplist'
plot(x,main=NULL,values=NULL,...)
## S3 method for class 'loopsummarylist'
plot(x,main=NULL,values=NULL,...)
## S3 method for class 'fittedlooplist2r'
plot(x,main=NULL,values=NULL,...)
## S3 method for class 'loopsummarylist2r'
plot(x,main=NULL,values=NULL,...)
## S3 method for class 'loop2r'
plot(x,split.line=TRUE,xlim=NULL,ylim=NULL,putNumber=FALSE,main=NULL,values=NULL,...)
## S3 method for class 'loop2rsummary'
plot(x,split.line=TRUE,xlim=NULL,ylim=NULL,putNumber=FALSE,main=NULL,values=NULL,...)
x |
a fitted ellipse or hysteresis loop created by either |
putNumber |
optional logical that numbers points from first to last. |
values |
one of NULL, "hysteresis", "inherent", "derived", "hysteresis.all", "ellipse", or "ellipse.all". Parameter values printed in title. Default is NULL in which case none are printed. See |
xlim |
limits for x axis. |
ylim |
limits for y axis. |
main |
an overall title for the plot. |
newPred |
draw an ellipse with 100 points. If |
show |
a character vector of parameters to be shown in the plot.
Possible values are "retention", "coercion", "b.x", "b.y", "semi.major","semi.minor","rote.deg","focus.x",and "focus.y".
|
split.line |
logical. Whether to include the split line, which is the input output relationship when hysteresis is removed. |
... |
Arguments to be passed to |
Spencer Maynes, Fan Yang, and Anne Parkhurst.
fel
for fitting points that form an ellipse and summary.ellipsefit
for bootstrapping and summarizing an ellipsefit object. Also floop
and summary.fittedloop
for fitting and summarizing hysteresis loops more generally.
##Fit and plot an ellipse
ellipse1 <- mel(sd.x=0.2,sd.y=0.04)
ellipse1.fit <- fel(ellipse1$x,ellipse1$y)
plot(ellipse1.fit,main="Simulated Ellipse",xlab="X Input",
ylab="Y Output",show=c("semi.major", "semi.minor"),values="ellipse.all")
### Bootstrapping
booted.ellipse <- fel(ellipse1$x,ellipse1$y,boot=TRUE, seed=123)
plot(booted.ellipse,xlab="X Input",ylab="Y Output",
main="Simulated Bootstrap Ellipse",values="ellipse")
##Fit and plot a hysteresis loop
loop1 <- mloop(sd.x=0.05,sd.y=0.05,n=5,m=3)
loopmodel <- floop(loop1$x,loop1$y,n=5,m=3)
plot(loopmodel,main="Simulated Hysteresis Loop n=5 m=3",
xlab="Input",ylab="Output", values="hysteresis.all")
booted.loop <- floop(loop1$x,loop1$y,,n=5,m=3,boot=TRUE, seed=1523)
plot(booted.loop,xlab="Input",ylab="Output",
main="Simulated Bootstrapped Loop n=5, m=3",putNumber=TRUE)
plot(booted.loop,main="Simulated Bootstrapped Loop n=5, m=3",
xlab="Input",ylab="Output",values="hysteresis.all")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.