I am trying to plot a simple x-y graph based on two arrays. But I can't seem to get it write. Any help would be appreciated.
VB.NET:
Imports System.Drawing.Drawing2D
Public Class Form1
Dim i, j As Integer
Private Sub Form1_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles Me.Paint
Dim x_data(10)
For i = 0 To x_data.Length - 1
x_data(i) = 10 * i
Next
Dim y_data(10)
For i = 0 To y_data.Length - 1
y_data(i) = 20 * i
Next
'Plot the data
Dim plotData As PointF() = {x_data(i), y_data(i)}
For i = 0 To plotData.Length - 1
e.Graphics.DrawCurve(Pens.Red, plotData)
Next
End Sub
End Class