Magnetic phase diagrams in heavy-fermion compounds