Пример #1
0
    // Update is called once per frame
    void Update()
    {
        Counter++;
        PrepareArrays();
        SimplestPlotScript.MyPlotType = PlotExample;
        switch (PlotExample)
        {
        case SimplestPlot.PlotType.TimeSeries:
            SimplestPlotScript.SeriesPlotY[0].YValues = Y1Values;
            SimplestPlotScript.SeriesPlotY[1].YValues = Y2Values;
            SimplestPlotScript.SeriesPlotX            = XValues;
            break;

        case SimplestPlot.PlotType.Distribution:
            SimplestPlotScript.DistributionPlot[0].Values = Y1Values;
            SimplestPlotScript.DistributionPlot[1].Values = Y2Values;
            break;

        case SimplestPlot.PlotType.PhaseSpace:
            SimplestPlotScript.PhaseSpacePlot[0].XValues = XValues;
            SimplestPlotScript.PhaseSpacePlot[0].YValues = Y1Values;
            SimplestPlotScript.PhaseSpacePlot[1].XValues = Y1Values;
            SimplestPlotScript.PhaseSpacePlot[1].YValues = Y2Values;
            break;

        default:
            break;
        }
        SimplestPlotScript.UpdatePlot();
    }
Пример #2
0
    // Update is called once per frame
    void Update()
    {
        Counter++;
        PrepareArrays();
        chart.SeriesPlotY[0].YValues = Y1Values;
        chart.SeriesPlotX            = XValues;

        chart.UpdatePlot();
    }
Пример #3
0
    // Update is called once per frame
    void Update()
    {
        updateDeltaBuf += Time.deltaTime;
        if (updateDeltaBuf < updateDelta)
        {
            return;
        }
        updateDeltaBuf = 0f;

        Counter++;
        PrepareArrays();
        SimplestPlotScript.MyPlotType = PlotExample;
        switch (PlotExample)
        {
        case SimplestPlot.PlotType.TimeSeries:
            SimplestPlotScript.SeriesPlotY[0].YValues = Y1Values.ToArray();
            SimplestPlotScript.SeriesPlotY[1].YValues = Y2Values.ToArray();
            SimplestPlotScript.SeriesPlotX            = XValues.ToArray();
            break;

        case SimplestPlot.PlotType.Distribution:
            SimplestPlotScript.DistributionPlot[0].Values = Y1Values.ToArray();
            SimplestPlotScript.DistributionPlot[1].Values = Y2Values.ToArray();
            break;

        case SimplestPlot.PlotType.PhaseSpace:
            SimplestPlotScript.PhaseSpacePlot[0].XValues = XValues.ToArray();
            SimplestPlotScript.PhaseSpacePlot[0].YValues = Y1Values.ToArray();
            //SimplestPlotScript.PhaseSpacePlot[1].XValues = Y1Values.ToArray();
            //SimplestPlotScript.PhaseSpacePlot[1].YValues = Y2Values.ToArray();
            break;

        default:
            break;
        }
        SimplestPlotScript.UpdatePlot();
    }