Welcome to PF.
Ep is the potential energy of the mass and it is on the Y-axis, right? And the graph is crossing above 0 on the Y-axis? Then you are getting an output energy that is below your input energy. This would be because the weight hits the ground with kinetic energy: you aren't converting all of the potential energy to rotational energy in the flywheel.