Function to plot a distribution of fitnesses W or selection coefficients S for a given optimal aa and other terms.
PlotPerAAFitness(aa.fitness.matrices, values, optimal.aa = NULL,
palette = "Set1", lwd = 2, include.stop.codon = FALSE,
type = "histogram", fitness = TRUE, scale.x.axis.by.Ne = FALSE,
legend.title = NULL, Ne = 10^6, ...)
A 3d array of aa.fitness.matrix returned from ComputeEquilibriumAAFitness (first element in return)
The vector of labels for each matrix (i.e., different Phi values)
Single letter code for the optimal aa. If NULL, integrates across aa.
Color palette to use from RColorBrewer
Line width
Include stop codons
If "histogram", do a histogram plot; if "density", do a density plot
If TRUE, plot fitness W; if FALSE, plot selection coefficient S (= W- 1)
if TRUE, x axis is transformed from S to S*Ne; if FALSE no scaling is done
Sets the title of the figure legend.
used to scale x axis when scale.x.axis.by.Ne is TRUE
Other paramters to pass to plot()