Learn R Programming

astsa (version 2.1)

scatter.hist: Scatterplot with Marginal Histograms

Description

Draws a scatterplot with histograms in the margins.

Usage

scatter.hist(x, y, xlab = NULL, ylab = NULL, title = NULL, pt.size = 1, 
              hist.col = gray(0.82), pt.col = gray(0.1, 0.25), pch = 19, 
              reset.par = TRUE, ...)

Arguments

x

vector of x-values

y

corresponding vector of y-values

xlab

x-axis label (defaults to name of x)

ylab

y-axis label (defaults to name of y)

title

plot title (optional)

pt.size

size of points in scatterplot

hist.col

color for histograms

pt.col

color of points in scatterplot

pch

scatterplot point character

reset.par

reset graphics - default is TRUE; set to FALSE to add on to scatterplot

...

other graphical parameters

Author

D.S. Stoffer

References

You can find demonstrations of astsa capabilities at FUN WITH ASTSA.

The most recent version of the package can be found at https://github.com/nickpoison/astsa/.

In addition, the News and ChangeLog files are at https://github.com/nickpoison/astsa/blob/master/NEWS.md.

The webpages for the texts and some help on using R for time series analysis can be found at https://nickpoison.github.io/.

Examples

Run this code
scatter.hist(tempr, cmort, hist.col=astsa.col(5,.4), pt.col=5, pt.size=1.5, reset=FALSE)
lines(lowess(tempr, cmort), col=6)

Run the code above in your browser using DataLab