Add data to an existing plot or create a new one

plot_data(trait.data, base.plot = NULL, ymax)

Arguments

trait.data

Data to be plotted

base.plot

a ggplot object (grob), created if none provided

ymax

maximum height of y

Value

updated plot object

Details

Used to add raw data or summary statistics to the plot of a distribution. The height of Y is arbitrary, and can be set to optimize visualization. If SE estimates are available, the SE will be plotted

Author

David LeBauer

Examples

if (FALSE) plot_data(data.frame(Y = c(1, 2), se = c(1,2)), base.plot = NULL, ymax = 10) # \dontrun{}