Refactored plot drawing into draw_plot method.

The flicker in the animated plots was due to odd behavior with the
begin_paint/end_paint that was most easily solved by refactoring the
actual paint drawing functionality. This has the added advantage that
the draw-on-canvas method is now obvious to call and obvious to
override by a subclass.
Improved examples scripts; added a format-ticks example