# NOT RUN {
set.seed(34903490)
x = rnorm(50)
y = 0.5*x^2 + 2*x + rnorm(length(x))
frm = data.frame(x=x,y=y)
WVPlots::ScatterHist(frm, "x", "y",
title= "Example Fit",
smoothmethod = "gam",
contour = TRUE)
# Same plot with custom colors
WVPlots::ScatterHist(frm, "x", "y",
title= "Example Fit",
smoothmethod = "gam",
contour = TRUE,
point_color = "#006d2c", # dark green
hist_color = "#6baed6", # medium blue
smoothing_color = "#54278f", # dark purple
density_color = "#08519c", # darker blue
contour_color = "#9e9ac8") # lighter purple
# }
Run the code above in your browser using DataLab