For CDF plots, make legend columns equal to number of datasets plotted
Fixed variable regular expression to enable constants in expressions.