Last chance! 50% off unlimited learning
Sale ends in
fill_area(x, y, from = 0, col = "black", alpha = 0.25, border = NA,
na.rm = TRUE, horiz = TRUE, outline = FALSE, ...)
x
and y
. Defaults to TRUE. If set to FALSE, missing values
may cause that the filled area is split in various smaller areas.par
.check_normaldist
Other Functions for plotting: addInterval
,
add_bars
, alphaPalette
,
alpha
, check_normaldist
,
color_contour
, dotplot_error
,
drawArrows
, emptyPlot
,
errorBars
, fadeRug
,
getCoords
, getFigCoords
,
getProps
, gradientLegend
,
marginDensityPlot
,
plot_error
, plot_image
,
plotsurface
, rug_model
# density of a random sample from normal distribution:
test <- density(rnorm(1000))
emptyPlot(range(test$x), range(test$y))
fill_area(test$x, test$y)
fill_area(test$x, test$y, from=.1, col='red')
fill_area(test$x, test$y, from=.2, col='blue', density=10, lwd=3)
lines(test$x, test$y, lwd=2)
Run the code above in your browser using DataLab