[plt-scheme] newbie - plotting points

From: andrew cooke (andrew at acooke.org)
Date: Wed Jan 18 17:15:52 EST 2006

Thanks to all who replied.  I had seen the PLoTScheme when I first
searched around before using the GUI classes, but it needs (I believe) the
installation of further packages.  I was hoping there was a simpler
solution, although I might switch to that anyway if I start re-inventing
the wheel too much.

Anyway, graphics module in misclib does all I need for now.  In case
anyone searches this mail list, here's the code...

Thanks,
Andrew

(module tmp mzscheme

  (require (lib "graphics.ss" "graphics"))

  (open-graphics)

  (define viewport
    (open-viewport "fibonacci" 300 300))

  (define (dot x y)
    (let ((plot (draw-pixel viewport))
          (p (make-posn x y)))
    (plot p "red")))

  (dot 10 10)

  (get-key-press viewport)

  (close-graphics))




Posted on the users mailing list.