R/densityPlot.R
densityPlot.Rd
Constructs a density plot for a calculated variable in e_meta
portion of ftmsData
object
ftmsData object of class peakData or compoundData
column name of column in e_meta
which should be plotted. Must be one of the column names in ftmsObj$e_meta
that contains numeric values.
vector of sample names to plot. Default of NA
indicates all samples found in ftmsObj
should be plotted. Specify samples=FALSE
to plot no samples, only groups.
vector of group names to plot. Value of NA
indicates all groups found in ftmsObj
should be plotted. Default value of groups=FALSE
to plot no groups, only samples.
plot title, default is NA (no title)
what should the y-axis represent, "density" or "count"?
TRUE/FALSE should a histogram be added to the plot? A histogram may only be added if a single sample or groups is plotted.
TRUE/FALSE should a smoothed curve be added to the plot?
named vector of colors for curves, where names correspond to samples or groups chosen. Named colors or hex codes are accepted.
(single) color for histogram bars. Named colors or hex codes are accepted.
x axis label, default is NULL, which will result in the same name as "variable"
y axis label, default is "Density"
a plotly object
If a histogram is produced, the histogram bar data as a data frame is attached to the output as the attribute hist_data
.
This may be useful for adding additional data to the plot, e.g. for linking selections in multiple plots.
plot_ly