Private Sub PictureBox1_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles PictureBox1.Paint Dim g = e.Graphics Dim maxx = 50.9! Dim minx = -45.2! Dim maxy = 60.3! Dim miny = -20.3! Dim fncy = Function(y As Single) (maxy - y) Dim pen As New Pen(Brushes.Black, 0.1) g.Clear(Color.White) Dim xrate = g.VisibleClipBounds.Width / (maxx - minx) Dim yrate = g.VisibleClipBounds.Height / (maxy - miny) g.ScaleTransform(xrate, yrate) g.TranslateTransform(-minx, 0) g.DrawLine(pen, minx, fncy(0), maxx, fncy(0)) g.DrawLine(pen, 0.0!, fncy(miny), 0.0!, fncy(maxy)) Dim fncTest = Function(x As Single) 0.001225! * x * x * x Dim x1 = minx Dim y1 = fncTest(x1) For x2 = minx To maxx Step 0.02! Dim y2 = fncTest(x2) g.DrawLine(pen, x1, fncy(y1), x2, fncy(y2)) x1 = x2 y1 = y2 Next Dim fnt As New Font("MS ゴシック", 12 / xrate) Dim sz = g.MeasureString("x", fnt) g.DrawString("x", fnt, Brushes.Black, maxx - sz.Width, fncy(sz.Height)) g.DrawString("y", fnt, Brushes.Black, 0.0!, fncy(maxy)) fnt.Dispose() pen.Dispose() End Sub