Description Usage Arguments Details Value Examples

Simple scatterplot with orthogonal fit line and optional R2 value.

1 | ```
plot_ortho(x, y, col, lcol, ann = TRUE, ...)
``` |

`x` |
vector of x-axis values |

`y` |
vector of y-axis values |

`col` |
single value or vector of point colors |

`lcol` |
value for line colors |

`ann` |
logical, should annotation for R2 value be added to top of plot? |

`...` |
further arguments passed to other methods |

Uses `prcomp`

to fit orthogonal line. Data are
first centered but not scaled for PCA step, therefore, consider
carefully whether unscaled data are meaningful in your use case.
Plot aspect is fixed at `asp=1`

.

Converting values to interpoint distances beforehand may be useful for comparing e.g., ordination scores.

A plot object

1 2 3 4 5 6 7 8 9 10 11 | ```
set.seed(23)
N <- 99
x <- runif(N,0,1)
y1 <- x + rnorm(N, 0, .1)
y2 <- x + rnorm(N, 0, .5)
y3 <- rnorm(N, 0, x*.3)
set_par(4)
plot_ortho(x, y1)
plot_ortho(x, y2)
plot_ortho(x, y3)
plot_ortho(y3, x)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.