diff --git a/collects/plot/common/parameters.rkt b/collects/plot/common/parameters.rkt index 45d7c15377..2b0387f854 100644 --- a/collects/plot/common/parameters.rkt +++ b/collects/plot/common/parameters.rkt @@ -20,8 +20,7 @@ (defparam plot-height exact-positive-integer? 400) (defparam plot-new-window? boolean? #f) (defparam plot-jpeg-quality (integer-in 0 100) 100) -(defparam plot-ps-interactive? boolean? #f) -(defparam plot-pdf-interactive? boolean? #f) +(defparam plot-ps/pdf-interactive? boolean? #f) ;; General appearance @@ -46,6 +45,12 @@ (defparam plot-y-label (or/c string? #f) "y axis") (defparam plot-z-label (or/c string? #f) #f) +(defparam plot-animating? boolean? #f) + +(defproc (animated-samples [samples (and/c exact-integer? (>=/c 2))]) (and/c exact-integer? (>=/c 2)) + (cond [(plot-animating?) (max 2 (ceiling (* 1/4 samples)))] + [else samples])) + ;; Lines (defparam line-samples (and/c exact-integer? (>=/c 2)) 500) @@ -148,18 +153,12 @@ ;; General appearance (defparam plot3d-samples (and/c exact-integer? (>=/c 2)) 41) -(defparam plot3d-animating? boolean? #f) (defparam plot3d-angle real? 30) (defparam plot3d-altitude real? 60) -(defparam plot3d-ambient-light-value (real-in 0 1) 2/3) +(defparam plot3d-ambient-light (real-in 0 1) 2/3) (defparam plot3d-diffuse-light? boolean? #t) (defparam plot3d-specular-light? boolean? #t) -(defproc (samples/animating? [samples (and/c exact-integer? (>=/c 2))] - ) (and/c exact-integer? (>=/c 2)) - (cond [(plot3d-animating?) (max 2 (ceiling (* 1/4 samples)))] - [else samples])) - ;; Surfaces (defparam surface-color plot-color/c 0) diff --git a/collects/plot/deprecated.rkt b/collects/plot/deprecated.rkt index 4f050d4c84..5099f52abb 100644 --- a/collects/plot/deprecated.rkt +++ b/collects/plot/deprecated.rkt @@ -11,18 +11,9 @@ "plot3d/surface.rkt" "plot3d/renderer.rkt" "utils.rkt" - "deprecated/renderers.rkt" - ;; Curve fitting - "deprecated/fit.rkt" - ;; Miscellaneous - "deprecated/math.rkt") + "deprecated/renderers.rkt") -(provide mix line contour shade surface - ;; Curve fitting - (rename-out [fit-int fit]) - (struct-out fit-result) - ;; Miscellaneous - make-vec derivative gradient) +(provide mix line contour shade surface) (define (mix . renderers) (deprecation-warning "mix" "list") diff --git a/collects/plot/plot2d/area.rkt b/collects/plot/plot2d/area.rkt index 713c3baa5a..8ed1256b0c 100644 --- a/collects/plot/plot2d/area.rkt +++ b/collects/plot/plot2d/area.rkt @@ -246,8 +246,8 @@ (define/public (start-renderer rx-min rx-max ry-min ry-max) (reset-drawing-params) - (set-clipping-rect (vector (- area-x-min (plot-line-width)) - (- area-y-min (plot-line-width))) + (set-clipping-rect (vector (+ 1/2 (- area-x-min (plot-line-width))) + (+ 1/2 (- area-y-min (plot-line-width)))) (vector (+ area-x-max (plot-line-width)) (+ area-y-max (plot-line-width)))) (clip-to-bounds rx-min rx-max ry-min ry-max)) diff --git a/collects/plot/plot2d/plot.rkt b/collects/plot/plot2d/plot.rkt index 122127eed3..5689886c57 100644 --- a/collects/plot/plot2d/plot.rkt +++ b/collects/plot/plot2d/plot.rkt @@ -131,6 +131,8 @@ (define tick-skip (plot-tick-skip)) (define x-transform (plot-x-transform)) (define y-transform (plot-y-transform)) + (define z-transform (plot-z-transform)) + (define animating? (plot-animating?)) (dc (λ (dc x y) (parameterize ([plot-foreground foreground] @@ -144,7 +146,9 @@ [plot-tick-size tick-size] [plot-tick-skip tick-skip] [plot-x-transform x-transform] - [plot-y-transform y-transform]) + [plot-y-transform y-transform] + [plot-z-transform z-transform] + [plot-animating? animating?]) (plot/dc renderer-tree dc x y width height #:x-min x-min #:x-max x-max #:y-min y-min #:y-max y-max #:title title #:x-label x-label #:y-label y-label #:legend-anchor legend-anchor))) @@ -211,10 +215,10 @@ (define dc (case real-kind [(ps) (new post-script-dc% - [interactive (plot-ps-interactive?)] [parent #f] [use-paper-bbox #f] [as-eps #t] - [width width] [height height] [output output])] + [interactive (plot-ps/pdf-interactive?)] [parent #f] [use-paper-bbox #f] + [as-eps #t] [width width] [height height] [output output])] [(pdf) (new pdf-dc% - [interactive (plot-pdf-interactive?)] [parent #f] [use-paper-bbox #f] + [interactive (plot-ps/pdf-interactive?)] [parent #f] [use-paper-bbox #f] [width width] [height height] [output output])] [(svg) (new svg-dc% [width width] [height height] [output output] [exists 'truncate/replace])])) diff --git a/collects/plot/plot3d/area.rkt b/collects/plot/plot3d/area.rkt index 9803775e26..c000c4c0e7 100644 --- a/collects/plot/plot3d/area.rkt +++ b/collects/plot/plot3d/area.rkt @@ -467,7 +467,7 @@ (* 32 (expt (if (cos-angle . > . 0) cos-angle 0.0) 10))] [else 0.0])) ; ambient lighting - (define amb (plot3d-ambient-light-value)) + (define amb (plot3d-ambient-light)) ; put it all together (values (+ amb (* (- 1 amb) diff)) spec)])) diff --git a/collects/plot/plot3d/contour.rkt b/collects/plot/plot3d/contour.rkt index 5c8bcee125..05ed7646e5 100644 --- a/collects/plot/plot3d/contour.rkt +++ b/collects/plot/plot3d/contour.rkt @@ -21,8 +21,8 @@ (define ((contours3d-render-proc f levels samples colors widths styles alphas label) area) (define-values (x-min x-max y-min y-max z-min z-max) (send area get-bounds)) - (match-define (list xs ys zss) (f x-min x-max (samples/animating? samples) - y-min y-max (samples/animating? samples))) + (match-define (list xs ys zss) (f x-min x-max (animated-samples samples) + y-min y-max (animated-samples samples))) (define zs (cond [(list? levels) levels] [(eq? levels 'auto) (auto-contour-zs z-min z-max)] @@ -91,8 +91,8 @@ contour-colors contour-widths contour-styles alphas label) area) (define-values (x-min x-max y-min y-max z-min z-max) (send area get-bounds)) - (match-define (list xs ys zss) (f x-min x-max (samples/animating? samples) - y-min y-max (samples/animating? samples))) + (match-define (list xs ys zss) (f x-min x-max (animated-samples samples) + y-min y-max (animated-samples samples))) (define contour-zs (cond [(list? levels) levels] diff --git a/collects/plot/plot3d/isosurface.rkt b/collects/plot/plot3d/isosurface.rkt index 923b1988ad..e8b745fd73 100644 --- a/collects/plot/plot3d/isosurface.rkt +++ b/collects/plot/plot3d/isosurface.rkt @@ -25,9 +25,9 @@ area) (define-values (x-min x-max y-min y-max z-min z-max) (send area get-bounds)) (match-define (list xs ys zs dsss) - (f x-min x-max (samples/animating? samples) - y-min y-max (samples/animating? samples) - z-min z-max (samples/animating? samples))) + (f x-min x-max (animated-samples samples) + y-min y-max (animated-samples samples) + z-min z-max (animated-samples samples))) (send area put-alpha alpha) (send area put-brush color 'solid) @@ -98,9 +98,9 @@ area) (define-values (x-min x-max y-min y-max z-min z-max) (send area get-bounds)) (match-define (list xs ys zs dsss) - (f x-min x-max (samples/animating? samples) - y-min y-max (samples/animating? samples) - z-min z-max (samples/animating? samples))) + (f x-min x-max (animated-samples samples) + y-min y-max (animated-samples samples) + z-min z-max (animated-samples samples))) (define-values (fd-min fd-max) (let ([regular-ds (filter regular? (3d-sample->list dsss))]) @@ -189,9 +189,9 @@ (define ((polar3d-render-proc f g samples color line-color line-width line-style alpha label) area) (define-values (x-min x-max y-min y-max z-min z-max) (send area get-bounds)) (match-define (list xs ys zs dsss) - (g x-min x-max (samples/animating? samples) - y-min y-max (samples/animating? samples) - z-min z-max (samples/animating? samples))) + (g x-min x-max (animated-samples samples) + y-min y-max (animated-samples samples) + z-min z-max (animated-samples samples))) (send area put-alpha alpha) (send area put-brush color 'solid) diff --git a/collects/plot/plot3d/line.rkt b/collects/plot/plot3d/line.rkt index 37d7b05beb..e7ced21fc5 100644 --- a/collects/plot/plot3d/line.rkt +++ b/collects/plot/plot3d/line.rkt @@ -65,5 +65,5 @@ [#:alpha alpha (real-in 0 1) (line-alpha)] [#:label label (or/c string? #f) #f] ) renderer3d? - (lines3d-renderer (λ () (sample-parametric f t-min t-max (samples/animating? samples))) + (lines3d-renderer (λ () (sample-parametric f t-min t-max (animated-samples samples))) x-min x-max y-min y-max z-min z-max color width style alpha label)) diff --git a/collects/plot/plot3d/plot.rkt b/collects/plot/plot3d/plot.rkt index 1b0ffb3088..2df82378ea 100644 --- a/collects/plot/plot3d/plot.rkt +++ b/collects/plot/plot3d/plot.rkt @@ -93,11 +93,11 @@ (send area end-plot) (when (and (not (empty? legend-entries)) - (or (not (plot3d-animating?)) + (or (not (plot-animating?)) (not (equal? (plot-legend-anchor) 'center)))) (send area put-legend legend-entries)) - (when (plot3d-animating?) (send area put-angles)) + (when (plot-animating?) (send area put-angles)) (send area restore-drawing-params))))) @@ -154,31 +154,31 @@ (define x-transform (plot-x-transform)) (define y-transform (plot-y-transform)) (define z-transform (plot-z-transform)) + (define animating? (plot-animating?)) (define samples (plot3d-samples)) - (define animating? (plot3d-animating?)) - (define ambient-light-value (plot3d-ambient-light-value)) + (define ambient-light (plot3d-ambient-light)) (define diffuse-light? (plot3d-diffuse-light?)) (define specular-light? (plot3d-specular-light?)) (dc (λ (dc x y) - (parameterize ([plot-foreground foreground] - [plot-background background] - [plot-foreground-alpha foreground-alpha] - [plot-background-alpha background-alpha] - [plot-font-size font-size] - [plot-font-family font-family] - [plot-line-width line-width] - [plot-legend-box-alpha legend-box-alpha] - [plot-tick-size tick-size] - [plot-tick-skip tick-skip] - [plot-x-transform x-transform] - [plot-y-transform y-transform] - [plot-z-transform z-transform] - [plot3d-samples samples] - [plot3d-animating? animating?] - [plot3d-ambient-light-value ambient-light-value] - [plot3d-diffuse-light? diffuse-light?] - [plot3d-specular-light? specular-light?]) + (parameterize ([plot-foreground foreground] + [plot-background background] + [plot-foreground-alpha foreground-alpha] + [plot-background-alpha background-alpha] + [plot-font-size font-size] + [plot-font-family font-family] + [plot-line-width line-width] + [plot-legend-box-alpha legend-box-alpha] + [plot-tick-size tick-size] + [plot-tick-skip tick-skip] + [plot-x-transform x-transform] + [plot-y-transform y-transform] + [plot-z-transform z-transform] + [plot-animating? animating?] + [plot3d-samples samples] + [plot3d-ambient-light ambient-light] + [plot3d-diffuse-light? diffuse-light?] + [plot3d-specular-light? specular-light?]) (plot3d/dc renderer-tree dc x y width height #:x-min x-min #:x-max x-max #:y-min y-min #:y-max y-max #:z-min z-min #:z-max z-max @@ -203,7 +203,7 @@ ) (is-a?/c image-snip%) (make-3d-plot-snip (λ (angle altitude anim?) - (parameterize ([plot3d-animating? (if anim? #t (plot3d-animating?))]) + (parameterize ([plot-animating? (if anim? #t (plot-animating?))]) (plot3d-bitmap renderer-tree #:x-min x-min #:x-max x-max #:y-min y-min #:y-max y-max #:z-min z-min #:z-max z-max @@ -264,10 +264,10 @@ (define dc (case real-kind [(ps) (new post-script-dc% - [interactive (plot-ps-interactive?)] [parent #f] [use-paper-bbox #f] [as-eps #t] - [width width] [height height] [output output])] + [interactive (plot-ps/pdf-interactive?)] [parent #f] [use-paper-bbox #f] + [as-eps #t] [width width] [height height] [output output])] [(pdf) (new pdf-dc% - [interactive (plot-pdf-interactive?)] [parent #f] [use-paper-bbox #f] + [interactive (plot-ps/pdf-interactive?)] [parent #f] [use-paper-bbox #f] [width width] [height height] [output output])] [(svg) (new svg-dc% [width width] [height height] [output output] [exists 'truncate/replace])])) diff --git a/collects/plot/plot3d/surface.rkt b/collects/plot/plot3d/surface.rkt index 5e6943ad94..e858f586d0 100644 --- a/collects/plot/plot3d/surface.rkt +++ b/collects/plot/plot3d/surface.rkt @@ -23,8 +23,8 @@ (define ((surface3d-render-proc f samples color style line-color line-width line-style alpha label) area) (define-values (x-min x-max y-min y-max z-min z-max) (send area get-bounds)) - (match-define (list xs ys zss) (f x-min x-max (samples/animating? samples) - y-min y-max (samples/animating? samples))) + (match-define (list xs ys zss) (f x-min x-max (animated-samples samples) + y-min y-max (animated-samples samples))) (send area put-alpha alpha) (send area put-brush color style) diff --git a/collects/plot/scribblings/compat.scrbl b/collects/plot/scribblings/compat.scrbl index 0c37b0686e..8ec712b9da 100644 --- a/collects/plot/scribblings/compat.scrbl +++ b/collects/plot/scribblings/compat.scrbl @@ -129,8 +129,17 @@ Returns @racket[#t] if @racket[v] is one of the following symbols, @section[#:tag "curve-fit"]{Curve Fitting} -The @racketmodname[plot] library uses a non-linear, least-squares fit -algorithm to fit parameterized functions to given data. +@define[fit-warning]{ +@para{ +@bold{Do not use the @(racket fit) function. It is going to be removed in Racket 5.2.1.} +It relies on old C code that nobody understands or is willing to maintain, and that is also slightly crashy. +}} + +@fit-warning + +Quite independent of plotting, and for reasons lost in the sands of time, +the @racketmodname[plot] library provides a non-linear, least-squares +fit algorithm to fit parameterized functions to given data. The code that implements the algorithm is public domain, and is used by the @tt{gnuplot} package. @@ -204,6 +213,8 @@ A more realistic example can be found in (list-of (vector/c real? real? real? real?)))]) fit-result?]{ +@fit-warning + Attempts to fit a @defterm{fittable function} to the data that is given. The @racket[guess-list] should be a set of arguments and values. The more accurate your initial guesses are, the more likely diff --git a/collects/plot/scribblings/params.scrbl b/collects/plot/scribblings/params.scrbl index 687f4e364e..3aaa1ce164 100644 --- a/collects/plot/scribblings/params.scrbl +++ b/collects/plot/scribblings/params.scrbl @@ -27,12 +27,8 @@ before using @(racket plot) or @(racket plot3d).} The quality of JPEG images written by @(racket plot-file) and @(racket plot3d-file). See @(method bitmap% save-file). } -@doc-apply[plot-ps-interactive?]{ -If @(racket #t), @(racket plot-file) and @(racket plot3d-file) open a dialog when writing PostScript files. See @(racket post-script-dc%). -} - -@doc-apply[plot-pdf-interactive?]{ -If @(racket #t), @(racket plot-file) and @(racket plot3d-file) open a dialog when writing PDF files. See @(racket pdf-dc%). +@doc-apply[plot-ps/pdf-interactive?]{ +If @(racket #t), @(racket plot-file) and @(racket plot3d-file) open a dialog when writing PostScript or PDF files. See @(racket post-script-dc%) and @(racket pdf-dc%). } @section{Axis Transforms} @@ -96,6 +92,10 @@ See @(racket ->pen-color) and @(racket ->brush-color) for details on how PLoT in @doc-apply[plot-z-label]{The title and axis labels. A @(racket #f) value means the label is not drawn and takes no space. A @(racket "") value effectively means the label is not drawn, but it takes space. } +@doc-apply[plot-animating?]{ +When @(racket #t), certain renderers draw simplified plots to speed up drawing. PLoT sets it to @(racket #t), for example, when a user is clicking and dragging a 3D plot to rotate it. +} + @section{Lines} @doc-apply[line-samples] @@ -189,10 +189,9 @@ These parameters do not control the @italic{typical} appearance of plots. Instea @section{3D General Appearance} @doc-apply[plot3d-samples] -@doc-apply[plot3d-animating?] @doc-apply[plot3d-angle] @doc-apply[plot3d-altitude] -@doc-apply[plot3d-ambient-light-value] +@doc-apply[plot3d-ambient-light] @doc-apply[plot3d-diffuse-light?] @doc-apply[plot3d-specular-light?] diff --git a/collects/plot/scribblings/plot2d.scrbl b/collects/plot/scribblings/plot2d.scrbl index 6e0dee80b0..9893030dc2 100644 --- a/collects/plot/scribblings/plot2d.scrbl +++ b/collects/plot/scribblings/plot2d.scrbl @@ -62,7 +62,7 @@ Plot to different backends. Each of these procedures has the same keyword argume Use @(racket plot-file) to save a plot to a file. When creating a JPEG file, the parameter @(racket plot-jpeg-quality) determines its quality. -When creating a PostScript or PDF file, the parameters @(racket plot-ps-interactive?) and @(racket plot-pdf-interactive?) determine whether the user is given a dialog for setting printing parameters. +When creating a PostScript or PDF file, the parameter @(racket plot-ps/pdf-interactive?) determines whether the user is given a dialog for setting printing parameters. (See @(racket post-script-dc%) and @(racket pdf-dc%).) When @(racket kind) is @(racket 'auto), @(racket plot-file) tries to determine the kind of file to write from the file name extension. diff --git a/collects/plot/tests/compat-tests.rkt b/collects/plot/tests/compat-tests.rkt index dcf2573f0f..22caf316d1 100644 --- a/collects/plot/tests/compat-tests.rkt +++ b/collects/plot/tests/compat-tests.rkt @@ -1,7 +1,7 @@ #reader(lib"read.ss""wxme")WXME0108 ## #| This file uses the GRacket editor format. - Open this file in DrRacket version 5.1.3.11 or later to read it. + Open this file in DrRacket version 5.2.0.1 or later to read it. Most likely, it was created by saving a program in DrRacket, and it probably contains a program with non-text elements @@ -446,7 +446,7 @@ 255 255 -1 -1 43 1 #"\0" 0 -1 1 #"\0" 1.0 0 -1 -1 -1 -1 -1 -1 0 0 0 0 1 0 0.0 0.0 0.0 0.0 0.0 0.0 0 0 0 255 -255 255 -1 -1 0 1595 0 26 3 12 #"#lang racket" +255 255 -1 -1 0 1589 0 26 3 12 #"#lang racket" 0 0 4 29 1 #"\n" 0 0 4 29 1 #"\n" 0 0 17 3 1 #"#" @@ -494,6 +494,18 @@ 0 0 4 29 1 #"\n" 0 0 4 29 1 #"\n" 0 0 22 3 1 #"(" +0 0 14 3 7 #"require" +0 0 4 3 1 #" " +0 0 22 3 1 #"(" +0 0 14 3 7 #"only-in" +0 0 4 3 1 #" " +0 0 14 3 11 #"plot/compat" +0 0 4 3 1 #" " +0 0 14 3 8 #"gradient" +0 0 22 3 2 #"))" +0 0 4 29 1 #"\n" +0 0 4 29 1 #"\n" +0 0 22 3 1 #"(" 0 0 15 3 6 #"define" 0 0 4 3 1 #" " 0 0 22 3 1 #"(" @@ -542,8 +554,7 @@ 0 0 4 3 1 #" " 0 0 19 3 1 #"\"" 0 0 19 3 3 #"The" -0 0 19 3 1 #" " -0 0 19 3 37 #"old plot library produced this plot:\"" +0 0 19 3 38 #" old plot library produced this plot:\"" 0 0 22 3 1 #")" 0 0 4 29 1 #"\n" 0 0 4 3 2 #" " @@ -742,21 +753,6 @@ 0 0 22 3 2 #"))" 0 0 4 29 1 #"\n" 0 0 4 3 2 #" " -0 0 22 3 1 #"(" -0 0 15 3 6 #"define" -0 0 4 3 1 #" " -0 0 14 3 8 #"gradient" -0 0 4 3 1 #" " -0 0 22 3 1 #"(" -0 0 14 3 15 #"dynamic-require" -0 0 4 3 1 #" " -0 0 14 3 11 #"module-path" -0 0 4 3 1 #" " -0 0 20 3 1 #"'" -0 0 14 3 8 #"gradient" -0 0 22 3 2 #"))" -0 0 4 29 1 #"\n" -0 0 4 3 2 #" " 0 0 4 29 1 #"\n" 0 0 4 3 2 #" " 0 0 17 3 71 @@ -14292,8 +14288,7 @@ 0 0 4 3 1 #" " 0 0 19 3 1 #"\"" 0 0 19 3 7 #"Testing" -0 0 19 3 1 #" " -0 0 19 3 18 #"plot's #:out-file\"" +0 0 19 3 19 #" plot's #:out-file\"" 0 0 22 3 1 #")" 0 0 4 29 1 #"\n" 0 0 4 3 2 #" " @@ -14349,8 +14344,7 @@ 0 0 4 3 1 #" " 0 0 19 3 1 #"\"" 0 0 19 3 7 #"Testing" -0 0 19 3 1 #" " -0 0 19 3 20 #"plot3d's #:out-file\"" +0 0 19 3 21 #" plot3d's #:out-file\"" 0 0 22 3 1 #")" 0 0 4 29 1 #"\n" 0 0 4 3 2 #" " diff --git a/collects/plot/tests/fit-test-1.rkt b/collects/plot/tests/fit-test-1.rkt index 132e285e8e..9e3f47ed72 100644 --- a/collects/plot/tests/fit-test-1.rkt +++ b/collects/plot/tests/fit-test-1.rkt @@ -1,7 +1,7 @@ #reader(lib"read.ss""wxme")WXME0108 ## #| This file uses the GRacket editor format. - Open this file in DrRacket version 5.1.3.11 or later to read it. + Open this file in DrRacket version 5.2.0.1 or later to read it. Most likely, it was created by saving a program in DrRacket, and it probably contains a program with non-text elements @@ -221,12 +221,15 @@ 0 71 1 #"\0" 1.0 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 0 0 0 1.0 1.0 1.0 0 100 0 0 0 0 -1 -1 0 1 #"\0" -0 -1 1 #"\0" -1 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 0 0 0 1 1 1 200 0 0 0 0 0 -1 -1 0 1 -#"\0" 0 75 10 #"Monospace\0" 0.0 10 90 -1 90 -1 3 -1 0 1 0 1 0 0 0.0 0.0 0.0 0.0 0.0 0.0 0 0 0 255 255 255 1 -1 0 1 #"\0" +0 -1 1 #"\0" +1.0 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 0.0 0.0 0.0 1.0 1.0 1.0 200 0 0 0 0 +0 -1 -1 4 1 #"\0" +0 -1 1 #"\0" +1.0 0 92 -1 -1 -1 -1 -1 0 0 0 0 0 1 0.0 0.0 0.0 0.0 0.0 0.0 0 0 0 255 +255 0 -1 -1 0 1 #"\0" 0 75 1 #"\0" 0.0 11 90 -1 90 -1 3 -1 0 1 0 1 0 0 0.0 0.0 0.0 0.0 0.0 0.0 0 0 0 255 255 255 1 -1 0 1 #"\0" @@ -356,7 +359,7 @@ #"macro-debugger/syntax-browser/properties color-text% basic\0" 0 70 1 #"\0" 1.0 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 1.0 1.0 1.0 1.0 1.0 1.0 0 0 0 0 0 0 --1 -1 98 1 #"\0" +-1 -1 99 1 #"\0" 0 -1 1 #"\0" 1.0 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 0.0 0.0 0.0 1.0 1.0 1.0 190 190 190 0 0 0 -1 -1 4 1 #"\0" @@ -443,10 +446,7 @@ 255 255 -1 -1 43 1 #"\0" 0 -1 1 #"\0" 1.0 0 -1 -1 -1 -1 -1 -1 0 0 0 0 1 0 0.0 0.0 0.0 0.0 0.0 0.0 0 0 0 255 -255 255 -1 -1 4 1 #"\0" -0 -1 1 #"\0" -1.0 0 92 -1 -1 -1 -1 -1 0 0 0 0 0 1 0.0 0.0 0.0 0.0 0.0 0.0 0 0 0 255 -255 0 -1 -1 0 250 0 26 3 12 #"#lang racket" +255 255 -1 -1 0 259 0 26 3 12 #"#lang racket" 0 0 4 29 1 #"\n" 0 0 4 29 1 #"\n" 0 0 17 3 81 @@ -457,9 +457,19 @@ 0 0 4 29 1 #"\n" 0 0 22 3 1 #"(" 0 0 14 3 7 #"require" -0 0 17 3 1 #" " +0 0 4 3 1 #" " 0 0 14 3 4 #"plot" -0 0 22 3 1 #")" +0 0 4 29 1 #"\n" +0 0 4 3 9 #" " +0 0 22 3 1 #"(" +0 0 14 3 7 #"only-in" +0 0 4 3 1 #" " +0 0 14 3 11 #"plot/compat" +0 0 4 3 1 #" " +0 0 14 3 3 #"fit" +0 0 4 3 1 #" " +0 0 14 3 23 #"fit-result-final-params" +0 0 22 3 2 #"))" 0 0 4 29 1 #"\n" 0 0 4 29 1 #"\n" 0 0 22 3 1 #"(" @@ -622,8 +632,7 @@ 0 0 14 3 9 #"displayln" 0 0 4 3 1 #" " 0 0 19 3 1 #"\"" -0 0 19 3 4 #"The " -0 0 19 3 37 #"old plot library produced this plot:\"" +0 0 19 3 41 #"The old plot library produced this plot:\"" 0 0 22 3 1 #")" 0 0 4 29 1 #"\n" 0 2 41 4 1 #"\0" diff --git a/collects/plot/tests/fit-test-2.rkt b/collects/plot/tests/fit-test-2.rkt index fd8b256223..bad31fed8e 100644 --- a/collects/plot/tests/fit-test-2.rkt +++ b/collects/plot/tests/fit-test-2.rkt @@ -1,7 +1,7 @@ #reader(lib"read.ss""wxme")WXME0108 ## #| This file uses the GRacket editor format. - Open this file in DrRacket version 5.1.3.12 or later to read it. + Open this file in DrRacket version 5.2.0.1 or later to read it. Most likely, it was created by saving a program in DrRacket, and it probably contains a program with non-text elements @@ -446,7 +446,7 @@ 255 255 -1 -1 43 1 #"\0" 0 -1 1 #"\0" 1.0 0 -1 -1 -1 -1 -1 -1 0 0 0 0 1 0 0.0 0.0 0.0 0.0 0.0 0.0 0 0 0 255 -255 255 -1 -1 0 748 0 26 3 12 #"#lang racket" +255 255 -1 -1 0 753 0 26 3 12 #"#lang racket" 0 0 4 29 1 #"\n" 0 0 4 29 1 #"\n" 0 0 17 3 81 @@ -461,7 +461,19 @@ 0 0 14 3 4 #"plot" 0 0 4 3 1 #" " 0 0 14 3 8 #"rackunit" -0 0 22 3 1 #")" +0 0 4 29 1 #"\n" +0 0 4 3 9 #" " +0 0 22 3 1 #"(" +0 0 14 3 7 #"only-in" +0 0 4 3 1 #" " +0 0 14 3 11 #"plot/compat" +0 0 4 3 1 #" " +0 0 14 3 3 #"fit" +0 0 4 3 1 #" " +0 0 14 3 19 #"fit-result-function" +0 0 4 3 1 #" " +0 0 14 3 23 #"fit-result-final-params" +0 0 22 3 2 #"))" 0 0 4 29 1 #"\n" 0 0 4 29 1 #"\n" 0 0 17 3 45 #";; This is data from the Cavendish experiment" @@ -1416,8 +1428,7 @@ 0 0 4 3 1 #" " 0 0 19 3 1 #"\"" 0 0 19 3 3 #"The" -0 0 19 3 1 #" " -0 0 19 3 32 #"old library produced this plot:\"" +0 0 19 3 33 #" old library produced this plot:\"" 0 0 22 3 1 #")" 0 0 4 29 1 #"\n" 0 2 83 4 1 #"\0" @@ -2593,38 +2604,32 @@ 0 0 17 3 1 #" " 0 0 17 3 1 #"a" 0 0 17 3 1 #" " -0 0 17 3 4 #"44.5" -0 0 17 3 5 #" 0.5)" +0 0 17 3 9 #"44.5 0.5)" 0 0 4 29 1 #"\n" 0 0 17 3 2 #";(" 0 0 17 3 7 #"check-=" 0 0 17 3 1 #" " 0 0 17 3 3 #"tau" 0 0 17 3 1 #" " -0 0 17 3 4 #"57.5" -0 0 17 3 5 #" 0.5)" +0 0 17 3 9 #"57.5 0.5)" 0 0 4 29 1 #"\n" 0 0 17 3 2 #";(" 0 0 17 3 7 #"check-=" 0 0 17 3 1 #" " 0 0 17 3 3 #"phi" 0 0 17 3 1 #" " -0 0 17 3 5 #"-0.38" -0 0 17 3 6 #" 0.05)" +0 0 17 3 11 #"-0.38 0.05)" 0 0 4 29 1 #"\n" 0 0 17 3 2 #";(" 0 0 17 3 7 #"check-=" 0 0 17 3 1 #" " 0 0 17 3 1 #"T" 0 0 17 3 1 #" " -0 0 17 3 4 #"13.1" -0 0 17 3 5 #" 0.5)" +0 0 17 3 9 #"13.1 0.5)" 0 0 4 29 1 #"\n" 0 0 17 3 2 #";(" 0 0 17 3 7 #"check-=" 0 0 17 3 1 #" " -0 0 17 3 6 #"theta0" -0 0 17 3 1 #" " -0 0 17 3 8 #"2.5 0.5)" +0 0 17 3 15 #"theta0 2.5 0.5)" 0 0 4 29 1 #"\n" 0 0