diff --git a/collects/plot/common/plot-element.rkt b/collects/plot/common/plot-element.rkt index 9c8f982fe4..30c70f0611 100644 --- a/collects/plot/common/plot-element.rkt +++ b/collects/plot/common/plot-element.rkt @@ -129,7 +129,5 @@ (rect-meet bounds-rect (rect-inexact->exact elem-bounds-rect)) bounds-rect)]) (if elem-bounds-fun - (let ([new-elem-bounds-rect (elem-bounds-fun elem-bounds-rect)]) - ;(printf "new-elem-bounds-rect = ~v~n" new-elem-bounds-rect) - (rect-inexact->exact new-elem-bounds-rect)) + (rect-inexact->exact (elem-bounds-fun elem-bounds-rect)) elem-bounds-rect))) diff --git a/collects/plot/plot2d/plot-area.rkt b/collects/plot/plot2d/plot-area.rkt index 30e3395fb5..3c51d112d9 100644 --- a/collects/plot/plot2d/plot-area.rkt +++ b/collects/plot/plot2d/plot-area.rkt @@ -428,8 +428,9 @@ clip-y-min clip-y-max)) (in-value vs))]) (when (not (empty? vs)) - (let ([vs (if identity-transforms? vs (subdivide-lines plot->dc vs))]) - (send pd draw-lines (map (λ (v) (plot->dc v)) vs))))))) + (let* ([vs (if identity-transforms? vs (subdivide-lines plot->dc vs))] + [vs (map (λ (v) (plot->dc v)) vs)]) + (send pd draw-lines vs)))))) (define/public (put-line v1 v2) (when (and (vrational? v1) (vrational? v2)) diff --git a/collects/plot/tests/extreme-bounds-tests.rkt b/collects/plot/tests/extreme-bounds-tests.rkt index 6b4b6b62b7..f541814ced 100644 --- a/collects/plot/tests/extreme-bounds-tests.rkt +++ b/collects/plot/tests/extreme-bounds-tests.rkt @@ -6,11 +6,7 @@ (plot-y-label #f) (define stops (list (* 2 (inexact->exact -max.0)) - (inexact->exact -max.0) - (inexact->exact -min.0) - 0 - (inexact->exact +min.0) - (inexact->exact +max.0) + -max.0 -min.0 0 +min.0 +max.0 (* 2 (inexact->exact +max.0)))) (define (extreme-real->string x) @@ -27,7 +23,8 @@ (list (format "[~a,~a] × [~a,~a]" (extreme-real->string x-min) (extreme-real->string x-max) (extreme-real->string y-min) (extreme-real->string y-max)) - (time (plot (lines (list (vector x-min y-min) (vector x-max y-max))))))) + (time (plot (lines (list (vector (inexact->exact x-min) (inexact->exact y-min)) + (vector (inexact->exact x-max) (inexact->exact y-max)))))))) (set! num-2d (+ 1 num-2d)))) (printf "Total 2D plots: ~a~n" num-2d) @@ -49,7 +46,12 @@ (extreme-real->string x-min) (extreme-real->string x-max) (extreme-real->string y-min) (extreme-real->string y-max) (extreme-real->string z-min) (extreme-real->string z-max)) - (time (plot3d (lines3d (list (vector x-min y-min z-min) (vector x-max y-max z-max))))))) + (time (plot3d (lines3d (list (vector (inexact->exact x-min) + (inexact->exact y-min) + (inexact->exact z-min)) + (vector (inexact->exact x-max) + (inexact->exact y-max) + (inexact->exact z-max)))))))) (set! num-3d (+ 1 num-3d)))) (printf "Total plots: ~a~n" num-3d)