add_reg_plane: 3D Regression Plane

Description Usage Arguments Value Examples

View source: R/easy_plot_ly.R

Description

This is a helper function to add a 3D regression plane to a plot

Usage

1
2
3
Recommended that you use this function with a scatter plot

add_reg_plane(x, y, z , plot, color = 'blue')

Arguments

x

The x-axis variable

y

The y-axis variable

z

The z-axis variable

plot

The plot that you want to add a plane to

color

The color of the plane

Value

A 3D plane added to an exisiting plot

Examples

1
2
3
newPlot <- easy_plot_ly(x = iris$Sepal.Length, y = iris$Sepal.Width, z = iris$Petal.Length,
             color = iris$Species, type = 'scatter', data = iris)
add_reg_plane(x = iris$Sepal.Length, y = iris$Sepal.Width, z = iris$Petal.Length, plot = newPlot)

shanealman/EZRplots documentation built on May 13, 2020, 3:29 a.m.