Example #1
0
        public Plotter(PlotView forcesPlot, PlotView xxtxttPlot, PlotView statePlot)
        {
            _forcesPlot  = forcesPlot;
            _xxtxttPlot  = xxtxttPlot;
            _statePlot   = statePlot;
            _plots       = new PlotView[] { _forcesPlot, _xxtxttPlot, _statePlot };
            _forcesModel = DataExporter.CreateModel("Forces Graph", "f(t)", "g(t)", "h(t)", "w(t)");
            _xxtxttModel = DataExporter.CreateModel("Motion Graph", "x(t)", "x_t(t)", "x_tt(t)");
            _stateModel  = DataExporter.CreateModel("State Graph", "State Vector");

            _forcesPlot.Model = _forcesModel;
            _xxtxttPlot.Model = _xxtxttModel;
            _statePlot.Model  = _stateModel;

            SetGridlines(_forcesModel);
            SetGridlines(_xxtxttModel);
            SetGridlines(_stateModel);

            SetAxesLabels(_forcesModel, "Time", "Force");
            SetAxesLabels(_xxtxttModel, "Time", "Value");
            SetAxesLabels(_stateModel, "Position", "Velocity");
        }