plot_data_two_iso
creates a 2-D plot of mix and source tracer data and
saves the plot to a file in the working directory
plot_data_two_iso(isotopes, mix, source, discr, filename, plot_save_pdf,
plot_save_png)
2-vector of biotracer indices to plot (e.g. c(1,2) or c(2,3))
output from load_mix_data
output from load_source_data
output from load_discr_data
name of the plot file(s) to save (e.g. "isospace_plot")
T/F, save the plot(s) as a pdf?
T/F, save the plot(s) as a png?
An important detail is that plot_data_two_iso
plots the raw mix data
and adds the TDF to the source data, since this is the polygon that the
mixing model uses to determine proportions. The plotted source means are:
$$\mu_source + \mu_discr$$
The source error bars are +/- 1 standard deviation, calculated as a
combination of source and TDF variances:
$$\sqrt{\sigma^2_source + \sigma^2_discr}$$
plot_data_two_iso
looks for 'C', 'N', 'S', and 'O' in the biotracer column
headers and assumes they are stable isotopes, labeling the axes with, e.g.,
expression(paste(delta^13, "C (u2030)",sep="")).