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;