
fill_area(x, y, from = 0, col = "black", alpha = 0.25, border = NA,
na.rm = TRUE, ...)
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 Utility functions for plotting: addInterval
;
alphaPalette
; alpha
;
color_contour
; dotplot_error
;
emptyPlot
; errorBars
;
fadeRug
; find_difference
;
getCoords
; getFigCoords
;
gradientLegend
; horiz_error
;
plot_error
# 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