pass state data into curvefit functions and plotters