Learn R Programming

SHAPforxgboost (version 0.0.2)

scatter.plot.simple: simple scatter plot, adding marginal histogram by default.

Description

simple scatter plot, adding marginal histogram by default.

Usage

scatter.plot.simple(data, x, y, size0 = 0.2, alpha0 = 0.3,
  dilute = FALSE, add_hist = TRUE)

Arguments

data

dataset

x

x

y

y

size0

point size, default to 1 of nobs<1000, 0.4 if nobs>1000

alpha0

alpha of point

dilute

a number or logical, dafault to TRUE, will plot nrow(data_long)/dilute data. For example, if dilute = 5 will plot 1/5 of the data. if dilute = TRUE will plot half of the data.

add_hist

optional to add marginal histogram using ggExtra::ggMarginal but notice if add histogram, what is returned is no longer a ggplot2 object

Value

ggplot2 object if add_hist = FALSE

Examples

Run this code
# NOT RUN {
scatter.plot.simple(data = shap_score, x = "dayint", y = "AOT_Uncertainty")

# }

Run the code above in your browser using DataLab