scatterplot.CI: Draw a scatterplot with fitted line and/or confidence line.

View source: R/scatterplot.CI.R

scatterplot.CIR Documentation

Draw a scatterplot with fitted line and/or confidence line.

Description

Draw a scatterplot with fitted line and/or confidence line.

Usage


scatterplot.CI(mydata, x, y, line.col = "black", confidence.line.col = "red", confidence.line = FALSE, ...)

Arguments

mydata

a data.frame.

x

a string on x variable.

y

a string on y variable.

line.col

a color denotes the fitted line. The default is black color.

confidence.line.col

a color denotes the confidence line. The default is red color. It is invalid if confidence is FALSE.

...

further arguments to pass the function plot.

Examples

data(leaflife, package = "smatr")

scatterplot.CI(mydata = leaflife, x = "lma", y = "longev")
scatterplot.CI(mydata = subset(leaflife, soilp == "high"), x = "lma", y = "longev")
scatterplot.CI(mydata = subset(leaflife, soilp == "high"), x = "lma", y = "longev", confidence.line = T)


liuguofang/figsci documentation built on Nov. 24, 2023, 1:45 p.m.