0

I'm using scottplot in one of my projects ...

the application is written in C# and it receives every 20ms a INT value from the serial interface...I store the INT value in a array with 1080 points then i plot the graph...but the plot takes about 100ms, how can i speed up the plot...is there a function in the SignalPlot class where i can plot the last value of an array...?? The code is under

https://github.com/Johann-Schmid/plot/blob/master/plot/Form1.cs

Is there a better library to plot live time data...??


        private double[] liveDataAD = new double[4000];
        private double[] liveDataPIX = new double[4000];

        private List<byte> list = new List<byte>();
        private int nextValueIndex = -1;

        public delegate void ShowSerialData(List<byte> _readSerialValue);

        public Form1()
        {
            InitializeComponent();

            List<string> portList = new List<string>();

            portList.AddRange(SerialPort.GetPortNames());
            portList.Sort();

            string[] portNames = portList.ToArray();
            serialComboBox.Items.AddRange(portNames);

            serialComboBox.SelectedIndex = 0;

            this.Text = "Fligh Simulation";

            _serialPort = new SerialPort();
            _serialPort.BaudRate = 115200;
            _serialPort.Parity = Parity.None;

            var pltAD = formsPlot1.Plot.AddSignal(liveDataAD);
            var pltPX = formsPlot1.Plot.AddSignal(liveDataPIX);

        private void updateData()
        {
            formsPlot1.Refresh();
        }

I search for a function where i can speed up the plot of the SignalPlot in the Scottplot library.

Keyvan Soleimani
  • 606
  • 2
  • 4
  • 16
mikado
  • 1
  • 2

0 Answers0