Magnetic phase diagrams of multiferroic hexagonal RMnO_3 (R = Er, Yb, Tm, and Ho)