Produce a scatter plot of two given univariate time series.
tsscatterplot(
x,
y,
reg = FALSE,
title = NULL,
x.name = NULL,
y.name = NULL,
pwidth = 1,
pcol = "steelblue4",
regwidth = 0.7,
regcol = "red"
)A scatter plot of x (values on the x-axis) and y (values on the y-axis) will be displayed with no further values or objects returned.
two univariate time series object or a numeric vector or matrix.
optional. A logical value indicating whether a trend line estimated by regression should be included in the scatter plot. Default is FALSE.
title of the histogram. Default is NULL.
name of the series `x`. If omitted here, the series name found by tsname(x) will be taken over here. If tsname() is NULL, the variable name will be used instead. Default is NULL.
name of the series `y`. If omitted here, the series name found by tsname(y) will be taken over here. If tsname() is NULL, the variable name will be used instead. Default is NULL.
size of the markers in the scatter plot. Default is 1.
colour of the data points in the scatter plot. Default is `steelblue4`.
width of the trend line in the scatter plot. Default is 0.7.
colour of the trend line in the scatter plot. Default is `red`.
Ka Yui Karl Wu
tsscatterplot(airport$AvgRain, airport$Travellers)
Run the code above in your browser using DataLab