(require (lib "plot.ss" "plot")) (define (test-5) (parameterize ((current-output-port (open-output-text-editor text))) (printf "This is a plot of the sine function~n") (printf "~a~n" (plot (line sin))))) (define frame (instantiate frame% ("Test 4"))) (define canvas (instantiate editor-canvas% (frame) (min-width 500) (min-height 450) (style '(no-hscroll hide-vscroll)))) (define text (instantiate text% ())) (send canvas set-editor text) (send frame show #t) (test-5)