Scatter Plot

scatterPlot(
  ftmsObj,
  xCName,
  yCName,
  colorCName = NA,
  colorPal = NA,
  xlabel = xCName,
  ylabel = yCName,
  legendTitle = colorCName,
  title = NA,
  xrange = NA,
  yrange = NA,
  logColorCol = FALSE,
  hoverTextCName = NA,
  zero.min = FALSE
)

Arguments

ftmsObj

an object of class 'peakData' or 'compoundData', typically a result of as.peakData or mapPeaksToCompounds.

xCName

column name for x-axis, must be a column of ftmsObj$e_data or ftmsObj$e_meta

yCName

column name for y-axis, must be a column of ftmsObj$e_data or ftmsObj$e_meta

colorCName

column name for point colors, must be a column of ftmsObj$e_data or ftmsObj$e_meta

colorPal

color palette function, one of col_numeric, col_factor or similar scales palette function

xlabel

x axis label, default is xCName

ylabel

y axis label, default is yCName

legendTitle

title for the legend, only used when coloring points according to a numeric scale

title

plot title

xrange

x-axis bounds

yrange

y-axis bounds

logColorCol

TRUE/FALSE, should the color column be log-transformed? Default is FALSE.

hoverTextCName

column name for hover (mouseover) text, must be a column of ftmsObj$e_data or ftmsObj$e_meta

zero.min

TRUE/FALSE, if an axis range is not provided, should the automatic range minimum be set to 0?

Value

plotly object

Examples

if (FALSE) {
scatterPlot(exampleProcessedPeakData,
            "NOSC", 
            "DBE", 
            colorCName="HtoC_ratio", 
            legendTitle="H:C Ratio", 
            title="DBE vs NOSC for exampleProcessedPeakData")
}