Apparatus for the automatic plotting of magnetic hysteresis loops