bpplotM: improved to allow more general formulas