If desired, press the Print button to print a full-page graph in landscape
orientation.

DiscussionThe DrawLineGraphs procedure draws lines on the
Image.Canvas, the Printer.Canvas or a Bitmap.Canvas. The DrawState parameter to
DrawLineGraphs is a bit of a kludge. When this parameter has the value ptShowGraph,
and the Dynamic checkbox is checked, the Image is updated every 20th plotted
point.

As a simple way to blank an image, the ButtonClearClick method assigns NIL
to Image.Picture.

ConclusionsThis example showed how to create a simple graph "from
scratch" using 2D vectors and a TPantograph object.

In Delphi 3, and for more complicated examples, the new TChart component is
probably a better alternative for small datasets. For very large datasets, this approach
shown here might be attractive.