Description Usage Arguments Details Examples
Two way scatter plot by the objective variable with the data points' color and size denoting the attribute of an objective variable. twoway_scatterg() subgroups an objective variable's attribute, and twoway_scatterc() does not subgroup the objective variable.
1 2 3 4 5 6 | twoway_scatterg(data, xname, yname,
bysize, bycolor, xlabel, ylabel,
guidesize, guidecolor)
twoway_scatterc(data, xname, yname,
bycolor, shape, size,
xlabel, ylabel, guidecolor)
|
data |
Dataset to use for plot, must be in data.frame to plot. |
xname |
Consists of specification of x variable. |
yname |
Consists of specification of y variable. |
bysize |
Consists of specificiation of sorting variable by size. |
bycolor |
Consists of specificiation of sorting variable by color. |
xlabel |
Name for x axis labels. |
ylabel |
Name for y axis labels. |
shape |
Includes shape of data points (numerical value). |
size |
Includes size of data points (numerical value). |
guidesize |
Guide title for size. |
guidecolor |
Guide title for color. |
twoway_scatterg returns a ggplot of the two variables, along with the utilization of color and size of a subgroup of the objective variables (linear model is fit through the subgroups). twoway_scatterc returns a ggplot of two variables, with a sequential palette of an objective variable denoting specific attributes.
1 2 3 4 5 6 7 8 | example <- iris
example$obj <- example[,1]-example[,2]
twoway_scatterg(example, example$Sepal.Length, example$Petal.Length,
example$obj, example$Species, "Sepal Length", "Petal Length",
"Petal Length", "Species")
twoway_scatterc(example, example$Sepal.Length, example$Petal.Length,
example$obj, 16, 3, "Sepal Length", "Petal Length",
"Sepal and Petal Length Diff")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.