diff --git a/collects/plot/common/ticks.rkt b/collects/plot/common/ticks.rkt index c6d8b6634b..b5ed92e69e 100644 --- a/collects/plot/common/ticks.rkt +++ b/collects/plot/common/ticks.rkt @@ -29,9 +29,9 @@ (define e (floor-log10 (- x-max x-min))) (define mag (expt 10 e)) (define step (let ([y (/ (- x-max x-min) mag)]) - (cond [(y . < . 2) (* 1/5 mag)] - [(y . < . 5) (* 1/2 mag)] - [(y . < . 10) mag]))) + (cond [(y . < . 2) (* 1/5 mag)] + [(y . < . 5) (* 1/2 mag)] + [else mag]))) (define start (* (ceiling (/ x-min step)) step)) (define stop (* (floor (/ x-max step)) step)) (define num (+ 1 (round (/ (- stop start) step)))) diff --git a/collects/plot/tests/plot2d-tests.rkt b/collects/plot/tests/plot2d-tests.rkt index 14a6ee42a9..000531b9bc 100644 --- a/collects/plot/tests/plot2d-tests.rkt +++ b/collects/plot/tests/plot2d-tests.rkt @@ -11,6 +11,8 @@ (plot empty #:x-min -1 #:x-max 1 #:y-min -1 #:y-max 1) +(time (plot (function values 0 1000))) + (parameterize ([plot-background "black"] [plot-foreground "white"] [plot-background-alpha 1/2]