ScatterPlot: Create a standard scatter plot with a few extra elements...

Description Usage Arguments Details Value Author(s) References Examples

View source: R/ScatterPlot.R

Description

This function is a wrapper to the standard plott() function in the graphics package. It is tailored to generating a scatter plot, and adds detail to the stored object so that a better text description can be formulated using the VI() method in the BrailleR package.

Usage

1
2
3
ScatterPlot(x, y, ...)

FittedLinePlot(x, y, line.col=2, ...)

Arguments

x,y

numeric variables.

line.col

colour to be used for the fitted line; col is used to modify the colour of the points.

...

additional arguments passed on to the plotting function.

Details

These wrapper functions will draw the graphics plots for a set of points. The only difference is that the fitted line is added for the FittedLinePlot()

Value

An object of class scatterplot of fittedlineplot, with the addition of any calls to the main title or axis labels being explicitly stored even if a zero length character string.

Author(s)

A. Jonathan R. Godfrey

References

Godfrey, A.J.R. (2013) ‘Statistical Software from a Blind Person's Perspective: R is the Best, but we can make it better’, The R Journal 5(1), pp73-79.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
attach(airquality)
op = par(mfcol=c(3,2))
plot(Wind, Ozone, pch=4)
test1 = ScatterPlot(Wind, Ozone, pch=4)
test1 #does the plot method work?
plot(Wind, Ozone)
abline(coef(lm(Ozone~Wind)), col=4)
test2 = FittedLinePlot(Wind, Ozone, line.col=4)
test2 #does the plot method work?
par(op)
detach(airquality)
rm(test1); rm(test2); rm(op)

BrailleR documentation built on Aug. 10, 2018, 5:04 p.m.