diff --git a/collects/htdp/graphing.ss b/collects/htdp/graphing.ss index 1874e36b3c..ed62fb7a08 100644 --- a/collects/htdp/graphing.ss +++ b/collects/htdp/graphing.ss @@ -23,10 +23,12 @@ ;; between [0,10] and [0,10] on x/y axis (define (make-graph name) (start EAST SOUTH) - (draw-solid-line ORIGIN X-AXIS 'blue) - ((draw-string #cs(get-@VP)) (make-posn (+ OFFSET 10) (+ OFFSET 10)) "Y-AXIS") - (draw-solid-line ORIGIN Y-AXIS 'blue) - ((draw-string #cs(get-@VP)) (make-posn (- EAST 100) (- SOUTH 15)) "X-AXIS")) + (let* ([vp+pm #cs(get-@VP)] + [vp (car vp+pm)]) + (draw-solid-line ORIGIN X-AXIS 'blue) + ((draw-string vp) (make-posn (+ OFFSET 10) (+ OFFSET 10)) "Y-AXIS") + (draw-solid-line ORIGIN Y-AXIS 'blue) + ((draw-string vp) (make-posn (- EAST 100) (- SOUTH 15)) "X-AXIS"))) ;; (num -> num) symbol -> true ;; effect: draw function graph for x in [0,10] at delta = .1 diff --git a/collects/htdp/world.ss b/collects/htdp/world.ss index e3a882b619..7495033270 100644 --- a/collects/htdp/world.ss +++ b/collects/htdp/world.ss @@ -271,8 +271,8 @@ (with-handlers ([exn:break? break-handler] [exn? exn-handler]) (set! the-world (f the-world - (send e get-x) - (send e get-y) + (- (send e get-x) INSET) + (- (send e get-y) INSET) (cond [(send e button-down?) 'button-down] [(send e button-up?) 'button-up] [(send e dragging?) 'drag]