コード例 #1
0
 public void GraphRender()
 {
     if (Xs.Length < 2 || Ys.Length < 2)
     {
         return;
     }
     SP.Clear();
     SP.Grid();
     SP.PlotLine(Xs, Ys);
     pictureBox1.BackgroundImage = SP.Render();
     this.Refresh();
 }
コード例 #2
0
 public void ResizeAndRedraw()
 {
     if (fig == null)
     {
         return;
     }
     fig.Resize(pictureBox1.Width, pictureBox1.Height);
     fig.FrameRedraw();
     fig.PlotLines(Xs, Ys, 1, Color.Red);
     fig.PlotScatter(Xs, Ys, 5, Color.Blue);
     pictureBox1.Image = fig.Render();
 }
コード例 #3
0
ファイル: ScottPlotUC.cs プロジェクト: alansif/ah_recc
 public void UpdateGraph()
 {
     thinking = true;
     stopwatch.Restart();
     SP.Resize(pictureBox1.Width, pictureBox1.Height);
     SP.Clear();
     SP.Grid();
     SP.PlotLine(Xs, Ys);
     pictureBox1.BackgroundImage = SP.Render();
     this.Refresh();
     Application.DoEvents();
     stopwatch.Stop();
     MessageUpdate();
     thinking = false;
 }
コード例 #4
0
        private void button1_Click(object sender, EventArgs e)
        {
            fig = new ScottPlot.Figure(pictureBox1.Width, pictureBox1.Height);
            fig.styleForm();
            fig.labelY = "value";
            fig.labelX = "time (seconds)";


            int pointCount = (int)(nud_sec.Value * sampleRate);

            double[] Ys = fig.gen.RandomWalk(pointCount);
            fig.AxisSet(0, pointCount / sampleRate, null, null);
            fig.AxisAuto(null, Ys, .9, .9);

            fig.BenchmarkThis();
            fig.PlotSignal(Ys, 1.0 / sampleRate);
            pictureBox1.Image = fig.Render();
        }
コード例 #5
0
        private void button1_Click(object sender, EventArgs e)
        {
            var fig = new ScottPlot.Figure(pictureBox1.Width, pictureBox1.Height);

            fig.styleForm(); // optimizes colors for forms
            fig.labelTitle = "Plotting Point Arrays";
            fig.labelY     = "Random Walk";
            fig.labelX     = "Sample Number";

            // generate data
            int pointCount = 123;

            double[] Xs = fig.gen.Sequence(pointCount);
            double[] Ys = fig.gen.RandomWalk(pointCount);
            fig.AxisAuto(Xs, Ys, .9, .9);

            // make the plot
            //fig.BenchmarkThis();
            fig.PlotLines(Xs, Ys, 1, Color.Red);
            fig.PlotScatter(Xs, Ys, 5, Color.Blue);

            pictureBox1.Image = fig.Render();
        }
コード例 #6
0
 private void Redraw()
 {
     pictureBox1.Image = fig.Render();
 }