Quantcast
Channel: Measurement Studio for .NET Languages topics
Viewing all articles
Browse latest Browse all 1999

How to Plot XY Data WPF

$
0
0

Plotting on winform is quite simple but I am trying to move to wpf and encountering some issues. How can I plot XY graph with Graph control? In the example below, I just want to plot the signal vs t.  I can find some example for plotting but none is for xy plot

 

            int Fs = 1000;
            double T = 1.000 / Fs;
            int L = 2000;
            double[] t = new double[2000];
            double[] signal = new double[2000];

            for (int i = 0; i < L; i++)
            {
                t[i] = i * T;
                signal[i] = Math.Sin(2 * 3.14 * 50 * t[i]);
            }    Graph1.DataSource = signal;

Viewing all articles
Browse latest Browse all 1999

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>