| plotRelativeDataFrame | R Documentation |
Used internally by plotSpectraRelative() and similar functions. The two
data frames are matched up on their shared variables and the relative
difference of their y-values is plotted against the x-variable.
plotRelativeDataFrame(
frame1,
frame2,
params,
xlab = waiver(),
xtrans = "identity",
xlim = c(NA, NA),
ylim = c(NA, NA),
highlight = NULL,
legend_var = "Legend",
interpolate = FALSE
)
frame1, frame2 |
Data frames sharing the same first three variables (x, y
and grouping variable). The names of |
params |
A MizerParams object, used for the line colours. |
xlab |
Label for the x-axis. |
xtrans |
Transformation for the x-axis, e.g. |
xlim, ylim |
Numeric vectors of length two giving the axis limits. Use
|
highlight |
Name or vector of names of the species to be highlighted. |
legend_var |
Name of the variable used in the legend and to determine the line colour. |
interpolate |
Whether the two series may sit on different x-grids and
should be interpolated onto a common one, see
|
Both data frames must arrive ready to plot, on the axis they will be drawn
against and with any total line already among their rows. See
plotComparisonDataFrame() for why the preparation belongs to whatever
produced each operand rather than here.
A mizer_plot (ggplot2) object showing the relative difference.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.