Rename plot3d-animating? -> plot->animating?

Combine plot-ps-interactive? and plot-pdf-interactive? into plot-ps/pdf-interactive?
Rename plot3d-ambient-light-value -> plot3d-ambient-light
Fix off-by-one 2D plot area clipping
Add warning to docs about 'fit' disappearing
Stop providing 'fit', 'derivative', 'gradient' and 'make-vec' from the 'plot' module

Merge into 5.2
This commit is contained in:
Neil Toronto 2011-10-13 16:16:02 -06:00
parent 6d608e392c
commit 522ba14b9f
16 changed files with 144 additions and 132 deletions

View File

@ -20,8 +20,7 @@
(defparam plot-height exact-positive-integer? 400) (defparam plot-height exact-positive-integer? 400)
(defparam plot-new-window? boolean? #f) (defparam plot-new-window? boolean? #f)
(defparam plot-jpeg-quality (integer-in 0 100) 100) (defparam plot-jpeg-quality (integer-in 0 100) 100)
(defparam plot-ps-interactive? boolean? #f) (defparam plot-ps/pdf-interactive? boolean? #f)
(defparam plot-pdf-interactive? boolean? #f)
;; General appearance ;; General appearance
@ -46,6 +45,12 @@
(defparam plot-y-label (or/c string? #f) "y axis") (defparam plot-y-label (or/c string? #f) "y axis")
(defparam plot-z-label (or/c string? #f) #f) (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 ;; Lines
(defparam line-samples (and/c exact-integer? (>=/c 2)) 500) (defparam line-samples (and/c exact-integer? (>=/c 2)) 500)
@ -148,18 +153,12 @@
;; General appearance ;; General appearance
(defparam plot3d-samples (and/c exact-integer? (>=/c 2)) 41) (defparam plot3d-samples (and/c exact-integer? (>=/c 2)) 41)
(defparam plot3d-animating? boolean? #f)
(defparam plot3d-angle real? 30) (defparam plot3d-angle real? 30)
(defparam plot3d-altitude real? 60) (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-diffuse-light? boolean? #t)
(defparam plot3d-specular-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 ;; Surfaces
(defparam surface-color plot-color/c 0) (defparam surface-color plot-color/c 0)

View File

@ -11,18 +11,9 @@
"plot3d/surface.rkt" "plot3d/surface.rkt"
"plot3d/renderer.rkt" "plot3d/renderer.rkt"
"utils.rkt" "utils.rkt"
"deprecated/renderers.rkt" "deprecated/renderers.rkt")
;; Curve fitting
"deprecated/fit.rkt"
;; Miscellaneous
"deprecated/math.rkt")
(provide mix line contour shade surface (provide mix line contour shade surface)
;; Curve fitting
(rename-out [fit-int fit])
(struct-out fit-result)
;; Miscellaneous
make-vec derivative gradient)
(define (mix . renderers) (define (mix . renderers)
(deprecation-warning "mix" "list") (deprecation-warning "mix" "list")

View File

@ -246,8 +246,8 @@
(define/public (start-renderer rx-min rx-max ry-min ry-max) (define/public (start-renderer rx-min rx-max ry-min ry-max)
(reset-drawing-params) (reset-drawing-params)
(set-clipping-rect (vector (- area-x-min (plot-line-width)) (set-clipping-rect (vector (+ 1/2 (- area-x-min (plot-line-width)))
(- area-y-min (plot-line-width))) (+ 1/2 (- area-y-min (plot-line-width))))
(vector (+ area-x-max (plot-line-width)) (vector (+ area-x-max (plot-line-width))
(+ area-y-max (plot-line-width)))) (+ area-y-max (plot-line-width))))
(clip-to-bounds rx-min rx-max ry-min ry-max)) (clip-to-bounds rx-min rx-max ry-min ry-max))

View File

@ -131,6 +131,8 @@
(define tick-skip (plot-tick-skip)) (define tick-skip (plot-tick-skip))
(define x-transform (plot-x-transform)) (define x-transform (plot-x-transform))
(define y-transform (plot-y-transform)) (define y-transform (plot-y-transform))
(define z-transform (plot-z-transform))
(define animating? (plot-animating?))
(dc (λ (dc x y) (dc (λ (dc x y)
(parameterize ([plot-foreground foreground] (parameterize ([plot-foreground foreground]
@ -144,7 +146,9 @@
[plot-tick-size tick-size] [plot-tick-size tick-size]
[plot-tick-skip tick-skip] [plot-tick-skip tick-skip]
[plot-x-transform x-transform] [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 (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 #: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))) #:title title #:x-label x-label #:y-label y-label #:legend-anchor legend-anchor)))
@ -211,10 +215,10 @@
(define dc (define dc
(case real-kind (case real-kind
[(ps) (new post-script-dc% [(ps) (new post-script-dc%
[interactive (plot-ps-interactive?)] [parent #f] [use-paper-bbox #f] [as-eps #t] [interactive (plot-ps/pdf-interactive?)] [parent #f] [use-paper-bbox #f]
[width width] [height height] [output output])] [as-eps #t] [width width] [height height] [output output])]
[(pdf) (new pdf-dc% [(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])] [width width] [height height] [output output])]
[(svg) (new svg-dc% [(svg) (new svg-dc%
[width width] [height height] [output output] [exists 'truncate/replace])])) [width width] [height height] [output output] [exists 'truncate/replace])]))

View File

@ -467,7 +467,7 @@
(* 32 (expt (if (cos-angle . > . 0) cos-angle 0.0) 10))] (* 32 (expt (if (cos-angle . > . 0) cos-angle 0.0) 10))]
[else 0.0])) [else 0.0]))
; ambient lighting ; ambient lighting
(define amb (plot3d-ambient-light-value)) (define amb (plot3d-ambient-light))
; put it all together ; put it all together
(values (+ amb (* (- 1 amb) diff)) spec)])) (values (+ amb (* (- 1 amb) diff)) spec)]))

View File

@ -21,8 +21,8 @@
(define ((contours3d-render-proc f levels samples colors widths styles alphas label) area) (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)) (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) (match-define (list xs ys zss) (f x-min x-max (animated-samples samples)
y-min y-max (samples/animating? samples))) y-min y-max (animated-samples samples)))
(define zs (define zs
(cond [(list? levels) levels] (cond [(list? levels) levels]
[(eq? levels 'auto) (auto-contour-zs z-min z-max)] [(eq? levels 'auto) (auto-contour-zs z-min z-max)]
@ -91,8 +91,8 @@
contour-colors contour-widths contour-styles alphas label) contour-colors contour-widths contour-styles alphas label)
area) area)
(define-values (x-min x-max y-min y-max z-min z-max) (send area get-bounds)) (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) (match-define (list xs ys zss) (f x-min x-max (animated-samples samples)
y-min y-max (samples/animating? samples))) y-min y-max (animated-samples samples)))
(define contour-zs (define contour-zs
(cond [(list? levels) levels] (cond [(list? levels) levels]

View File

@ -25,9 +25,9 @@
area) area)
(define-values (x-min x-max y-min y-max z-min z-max) (send area get-bounds)) (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) (match-define (list xs ys zs dsss)
(f x-min x-max (samples/animating? samples) (f x-min x-max (animated-samples samples)
y-min y-max (samples/animating? samples) y-min y-max (animated-samples samples)
z-min z-max (samples/animating? samples))) z-min z-max (animated-samples samples)))
(send area put-alpha alpha) (send area put-alpha alpha)
(send area put-brush color 'solid) (send area put-brush color 'solid)
@ -98,9 +98,9 @@
area) area)
(define-values (x-min x-max y-min y-max z-min z-max) (send area get-bounds)) (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) (match-define (list xs ys zs dsss)
(f x-min x-max (samples/animating? samples) (f x-min x-max (animated-samples samples)
y-min y-max (samples/animating? samples) y-min y-max (animated-samples samples)
z-min z-max (samples/animating? samples))) z-min z-max (animated-samples samples)))
(define-values (fd-min fd-max) (define-values (fd-min fd-max)
(let ([regular-ds (filter regular? (3d-sample->list dsss))]) (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 ((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)) (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) (match-define (list xs ys zs dsss)
(g x-min x-max (samples/animating? samples) (g x-min x-max (animated-samples samples)
y-min y-max (samples/animating? samples) y-min y-max (animated-samples samples)
z-min z-max (samples/animating? samples))) z-min z-max (animated-samples samples)))
(send area put-alpha alpha) (send area put-alpha alpha)
(send area put-brush color 'solid) (send area put-brush color 'solid)

View File

@ -65,5 +65,5 @@
[#:alpha alpha (real-in 0 1) (line-alpha)] [#:alpha alpha (real-in 0 1) (line-alpha)]
[#:label label (or/c string? #f) #f] [#:label label (or/c string? #f) #f]
) renderer3d? ) 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)) x-min x-max y-min y-max z-min z-max color width style alpha label))

View File

@ -93,11 +93,11 @@
(send area end-plot) (send area end-plot)
(when (and (not (empty? legend-entries)) (when (and (not (empty? legend-entries))
(or (not (plot3d-animating?)) (or (not (plot-animating?))
(not (equal? (plot-legend-anchor) 'center)))) (not (equal? (plot-legend-anchor) 'center))))
(send area put-legend legend-entries)) (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))))) (send area restore-drawing-params)))))
@ -154,9 +154,9 @@
(define x-transform (plot-x-transform)) (define x-transform (plot-x-transform))
(define y-transform (plot-y-transform)) (define y-transform (plot-y-transform))
(define z-transform (plot-z-transform)) (define z-transform (plot-z-transform))
(define animating? (plot-animating?))
(define samples (plot3d-samples)) (define samples (plot3d-samples))
(define animating? (plot3d-animating?)) (define ambient-light (plot3d-ambient-light))
(define ambient-light-value (plot3d-ambient-light-value))
(define diffuse-light? (plot3d-diffuse-light?)) (define diffuse-light? (plot3d-diffuse-light?))
(define specular-light? (plot3d-specular-light?)) (define specular-light? (plot3d-specular-light?))
@ -174,9 +174,9 @@
[plot-x-transform x-transform] [plot-x-transform x-transform]
[plot-y-transform y-transform] [plot-y-transform y-transform]
[plot-z-transform z-transform] [plot-z-transform z-transform]
[plot-animating? animating?]
[plot3d-samples samples] [plot3d-samples samples]
[plot3d-animating? animating?] [plot3d-ambient-light ambient-light]
[plot3d-ambient-light-value ambient-light-value]
[plot3d-diffuse-light? diffuse-light?] [plot3d-diffuse-light? diffuse-light?]
[plot3d-specular-light? specular-light?]) [plot3d-specular-light? specular-light?])
(plot3d/dc (plot3d/dc
@ -203,7 +203,7 @@
) (is-a?/c image-snip%) ) (is-a?/c image-snip%)
(make-3d-plot-snip (make-3d-plot-snip
(λ (angle altitude anim?) (λ (angle altitude anim?)
(parameterize ([plot3d-animating? (if anim? #t (plot3d-animating?))]) (parameterize ([plot-animating? (if anim? #t (plot-animating?))])
(plot3d-bitmap (plot3d-bitmap
renderer-tree 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 #: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 (define dc
(case real-kind (case real-kind
[(ps) (new post-script-dc% [(ps) (new post-script-dc%
[interactive (plot-ps-interactive?)] [parent #f] [use-paper-bbox #f] [as-eps #t] [interactive (plot-ps/pdf-interactive?)] [parent #f] [use-paper-bbox #f]
[width width] [height height] [output output])] [as-eps #t] [width width] [height height] [output output])]
[(pdf) (new pdf-dc% [(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])] [width width] [height height] [output output])]
[(svg) (new svg-dc% [(svg) (new svg-dc%
[width width] [height height] [output output] [exists 'truncate/replace])])) [width width] [height height] [output output] [exists 'truncate/replace])]))

View File

@ -23,8 +23,8 @@
(define ((surface3d-render-proc f samples color style line-color line-width line-style alpha label) (define ((surface3d-render-proc f samples color style line-color line-width line-style alpha label)
area) area)
(define-values (x-min x-max y-min y-max z-min z-max) (send area get-bounds)) (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) (match-define (list xs ys zss) (f x-min x-max (animated-samples samples)
y-min y-max (samples/animating? samples))) y-min y-max (animated-samples samples)))
(send area put-alpha alpha) (send area put-alpha alpha)
(send area put-brush color style) (send area put-brush color style)

View File

@ -129,8 +129,17 @@ Returns @racket[#t] if @racket[v] is one of the following symbols,
@section[#:tag "curve-fit"]{Curve Fitting} @section[#:tag "curve-fit"]{Curve Fitting}
The @racketmodname[plot] library uses a non-linear, least-squares fit @define[fit-warning]{
algorithm to fit parameterized functions to given data. @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 The code that implements the algorithm is public
domain, and is used by the @tt{gnuplot} package. 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?)))]) (list-of (vector/c real? real? real? real?)))])
fit-result?]{ fit-result?]{
@fit-warning
Attempts to fit a @defterm{fittable function} to the data that is Attempts to fit a @defterm{fittable function} to the data that is
given. The @racket[guess-list] should be a set of arguments and given. The @racket[guess-list] should be a set of arguments and
values. The more accurate your initial guesses are, the more likely values. The more accurate your initial guesses are, the more likely

View File

@ -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). The quality of JPEG images written by @(racket plot-file) and @(racket plot3d-file). See @(method bitmap% save-file).
} }
@doc-apply[plot-ps-interactive?]{ @doc-apply[plot-ps/pdf-interactive?]{
If @(racket #t), @(racket plot-file) and @(racket plot3d-file) open a dialog when writing PostScript files. See @(racket post-script-dc%). 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%).
}
@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%).
} }
@section{Axis Transforms} @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-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} @section{Lines}
@doc-apply[line-samples] @doc-apply[line-samples]
@ -189,10 +189,9 @@ These parameters do not control the @italic{typical} appearance of plots. Instea
@section{3D General Appearance} @section{3D General Appearance}
@doc-apply[plot3d-samples] @doc-apply[plot3d-samples]
@doc-apply[plot3d-animating?]
@doc-apply[plot3d-angle] @doc-apply[plot3d-angle]
@doc-apply[plot3d-altitude] @doc-apply[plot3d-altitude]
@doc-apply[plot3d-ambient-light-value] @doc-apply[plot3d-ambient-light]
@doc-apply[plot3d-diffuse-light?] @doc-apply[plot3d-diffuse-light?]
@doc-apply[plot3d-specular-light?] @doc-apply[plot3d-specular-light?]

View File

@ -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. 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 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%).) (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. When @(racket kind) is @(racket 'auto), @(racket plot-file) tries to determine the kind of file to write from the file name extension.

View File

@ -1,7 +1,7 @@
#reader(lib"read.ss""wxme")WXME0108 ## #reader(lib"read.ss""wxme")WXME0108 ##
#| #|
This file uses the GRacket editor format. 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, Most likely, it was created by saving a program in DrRacket,
and it probably contains a program with non-text elements and it probably contains a program with non-text elements
@ -446,7 +446,7 @@
255 255 -1 -1 43 1 #"\0" 255 255 -1 -1 43 1 #"\0"
0 -1 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 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 4 29 1 #"\n" 0 0 4 29 1 #"\n"
0 0 17 3 1 #"#" 0 0 17 3 1 #"#"
@ -494,6 +494,18 @@
0 0 4 29 1 #"\n" 0 0 4 29 1 #"\n"
0 0 4 29 1 #"\n" 0 0 4 29 1 #"\n"
0 0 22 3 1 #"(" 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 15 3 6 #"define"
0 0 4 3 1 #" " 0 0 4 3 1 #" "
0 0 22 3 1 #"(" 0 0 22 3 1 #"("
@ -542,8 +554,7 @@
0 0 4 3 1 #" " 0 0 4 3 1 #" "
0 0 19 3 1 #"\"" 0 0 19 3 1 #"\""
0 0 19 3 3 #"The" 0 0 19 3 3 #"The"
0 0 19 3 1 #" " 0 0 19 3 38 #" old plot library produced this plot:\""
0 0 19 3 37 #"old plot library produced this plot:\""
0 0 22 3 1 #")" 0 0 22 3 1 #")"
0 0 4 29 1 #"\n" 0 0 4 29 1 #"\n"
0 0 4 3 2 #" " 0 0 4 3 2 #" "
@ -742,21 +753,6 @@
0 0 22 3 2 #"))" 0 0 22 3 2 #"))"
0 0 4 29 1 #"\n" 0 0 4 29 1 #"\n"
0 0 4 3 2 #" " 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 29 1 #"\n"
0 0 4 3 2 #" " 0 0 4 3 2 #" "
0 0 17 3 71 0 0 17 3 71
@ -14292,8 +14288,7 @@
0 0 4 3 1 #" " 0 0 4 3 1 #" "
0 0 19 3 1 #"\"" 0 0 19 3 1 #"\""
0 0 19 3 7 #"Testing" 0 0 19 3 7 #"Testing"
0 0 19 3 1 #" " 0 0 19 3 19 #" plot's #:out-file\""
0 0 19 3 18 #"plot's #:out-file\""
0 0 22 3 1 #")" 0 0 22 3 1 #")"
0 0 4 29 1 #"\n" 0 0 4 29 1 #"\n"
0 0 4 3 2 #" " 0 0 4 3 2 #" "
@ -14349,8 +14344,7 @@
0 0 4 3 1 #" " 0 0 4 3 1 #" "
0 0 19 3 1 #"\"" 0 0 19 3 1 #"\""
0 0 19 3 7 #"Testing" 0 0 19 3 7 #"Testing"
0 0 19 3 1 #" " 0 0 19 3 21 #" plot3d's #:out-file\""
0 0 19 3 20 #"plot3d's #:out-file\""
0 0 22 3 1 #")" 0 0 22 3 1 #")"
0 0 4 29 1 #"\n" 0 0 4 29 1 #"\n"
0 0 4 3 2 #" " 0 0 4 3 2 #" "

View File

@ -1,7 +1,7 @@
#reader(lib"read.ss""wxme")WXME0108 ## #reader(lib"read.ss""wxme")WXME0108 ##
#| #|
This file uses the GRacket editor format. 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, Most likely, it was created by saving a program in DrRacket,
and it probably contains a program with non-text elements and it probably contains a program with non-text elements
@ -221,12 +221,15 @@
0 71 1 #"\0" 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 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" -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 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 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" 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 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 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" 255 255 1 -1 0 1 #"\0"
@ -356,7 +359,7 @@
#"macro-debugger/syntax-browser/properties color-text% basic\0" #"macro-debugger/syntax-browser/properties color-text% basic\0"
0 70 1 #"\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.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" 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 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" 0 0 0 -1 -1 4 1 #"\0"
@ -443,10 +446,7 @@
255 255 -1 -1 43 1 #"\0" 255 255 -1 -1 43 1 #"\0"
0 -1 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 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" 255 255 -1 -1 0 259 0 26 3 12 #"#lang racket"
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"
0 0 4 29 1 #"\n" 0 0 4 29 1 #"\n"
0 0 4 29 1 #"\n" 0 0 4 29 1 #"\n"
0 0 17 3 81 0 0 17 3 81
@ -457,9 +457,19 @@
0 0 4 29 1 #"\n" 0 0 4 29 1 #"\n"
0 0 22 3 1 #"(" 0 0 22 3 1 #"("
0 0 14 3 7 #"require" 0 0 14 3 7 #"require"
0 0 17 3 1 #" " 0 0 4 3 1 #" "
0 0 14 3 4 #"plot" 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 4 29 1 #"\n" 0 0 4 29 1 #"\n"
0 0 22 3 1 #"(" 0 0 22 3 1 #"("
@ -622,8 +632,7 @@
0 0 14 3 9 #"displayln" 0 0 14 3 9 #"displayln"
0 0 4 3 1 #" " 0 0 4 3 1 #" "
0 0 19 3 1 #"\"" 0 0 19 3 1 #"\""
0 0 19 3 4 #"The " 0 0 19 3 41 #"The old plot library produced this plot:\""
0 0 19 3 37 #"old plot library produced this plot:\""
0 0 22 3 1 #")" 0 0 22 3 1 #")"
0 0 4 29 1 #"\n" 0 0 4 29 1 #"\n"
0 2 41 4 1 #"\0" 0 2 41 4 1 #"\0"

View File

@ -1,7 +1,7 @@
#reader(lib"read.ss""wxme")WXME0108 ## #reader(lib"read.ss""wxme")WXME0108 ##
#| #|
This file uses the GRacket editor format. 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, Most likely, it was created by saving a program in DrRacket,
and it probably contains a program with non-text elements and it probably contains a program with non-text elements
@ -446,7 +446,7 @@
255 255 -1 -1 43 1 #"\0" 255 255 -1 -1 43 1 #"\0"
0 -1 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 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 4 29 1 #"\n" 0 0 4 29 1 #"\n"
0 0 17 3 81 0 0 17 3 81
@ -461,7 +461,19 @@
0 0 14 3 4 #"plot" 0 0 14 3 4 #"plot"
0 0 4 3 1 #" " 0 0 4 3 1 #" "
0 0 14 3 8 #"rackunit" 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 4 29 1 #"\n" 0 0 4 29 1 #"\n"
0 0 17 3 45 #";; This is data from the Cavendish experiment" 0 0 17 3 45 #";; This is data from the Cavendish experiment"
@ -1416,8 +1428,7 @@
0 0 4 3 1 #" " 0 0 4 3 1 #" "
0 0 19 3 1 #"\"" 0 0 19 3 1 #"\""
0 0 19 3 3 #"The" 0 0 19 3 3 #"The"
0 0 19 3 1 #" " 0 0 19 3 33 #" old library produced this plot:\""
0 0 19 3 32 #"old library produced this plot:\""
0 0 22 3 1 #")" 0 0 22 3 1 #")"
0 0 4 29 1 #"\n" 0 0 4 29 1 #"\n"
0 2 83 4 1 #"\0" 0 2 83 4 1 #"\0"
@ -2593,38 +2604,32 @@
0 0 17 3 1 #" " 0 0 17 3 1 #" "
0 0 17 3 1 #"a" 0 0 17 3 1 #"a"
0 0 17 3 1 #" " 0 0 17 3 1 #" "
0 0 17 3 4 #"44.5" 0 0 17 3 9 #"44.5 0.5)"
0 0 17 3 5 #" 0.5)"
0 0 4 29 1 #"\n" 0 0 4 29 1 #"\n"
0 0 17 3 2 #";(" 0 0 17 3 2 #";("
0 0 17 3 7 #"check-=" 0 0 17 3 7 #"check-="
0 0 17 3 1 #" " 0 0 17 3 1 #" "
0 0 17 3 3 #"tau" 0 0 17 3 3 #"tau"
0 0 17 3 1 #" " 0 0 17 3 1 #" "
0 0 17 3 4 #"57.5" 0 0 17 3 9 #"57.5 0.5)"
0 0 17 3 5 #" 0.5)"
0 0 4 29 1 #"\n" 0 0 4 29 1 #"\n"
0 0 17 3 2 #";(" 0 0 17 3 2 #";("
0 0 17 3 7 #"check-=" 0 0 17 3 7 #"check-="
0 0 17 3 1 #" " 0 0 17 3 1 #" "
0 0 17 3 3 #"phi" 0 0 17 3 3 #"phi"
0 0 17 3 1 #" " 0 0 17 3 1 #" "
0 0 17 3 5 #"-0.38" 0 0 17 3 11 #"-0.38 0.05)"
0 0 17 3 6 #" 0.05)"
0 0 4 29 1 #"\n" 0 0 4 29 1 #"\n"
0 0 17 3 2 #";(" 0 0 17 3 2 #";("
0 0 17 3 7 #"check-=" 0 0 17 3 7 #"check-="
0 0 17 3 1 #" " 0 0 17 3 1 #" "
0 0 17 3 1 #"T" 0 0 17 3 1 #"T"
0 0 17 3 1 #" " 0 0 17 3 1 #" "
0 0 17 3 4 #"13.1" 0 0 17 3 9 #"13.1 0.5)"
0 0 17 3 5 #" 0.5)"
0 0 4 29 1 #"\n" 0 0 4 29 1 #"\n"
0 0 17 3 2 #";(" 0 0 17 3 2 #";("
0 0 17 3 7 #"check-=" 0 0 17 3 7 #"check-="
0 0 17 3 1 #" " 0 0 17 3 1 #" "
0 0 17 3 6 #"theta0" 0 0 17 3 15 #"theta0 2.5 0.5)"
0 0 17 3 1 #" "
0 0 17 3 8 #"2.5 0.5)"
0 0 4 29 1 #"\n" 0 0 4 29 1 #"\n"
0 0 0 0