View source: R/chem_dual.scatter.R
chem_dual.scatter | R Documentation |
Creates a scatterplot with a common horizontal axis and two different variables plotted on the vertical axis with regression lines
chem_dual.scatter(data, xvar, yvar1, yvar2, xlab = "Insert X-axis label", ylab = "Insert Y-axis label", intercept1 = NULL, intercept2 = NULL, size = 3, colors = c("red", "blue"))
data |
A data frame containing variables to be plotted |
xvar |
The name of the x-variable |
yvar1 |
The name of one of the y-variables |
yvar2 |
The name of the other y-variable |
xlab |
A string containing the x-axis label |
ylab |
A string containing the y-axis label |
intercept1 |
Set to NULL by default, but can be changed to 0 to force regression line to go through origin for yvar1 |
intercept2 |
Set to NULL by default, but can be changed to 0 to force regression line to go through origin for yvar2 |
size |
A numeric specifying the size of the points |
colors |
A character vector specifying colors of two y-variables and each line |
A plot
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.