Fixed >=/c contracts
This commit is contained in:
parent
c655cd0efb
commit
a07af20658
|
@ -79,7 +79,7 @@
|
|||
(defproc (cbrt-transform [x-min real?] [x-max real?]) invertible-function?
|
||||
(cbrt-trans x-min x-max))
|
||||
|
||||
(defproc (hand-drawn-transform [freq (and/c real? (>/c 0))]) (real? real? . -> . invertible-function?)
|
||||
(defproc (hand-drawn-transform [freq (>/c 0)]) (real? real? . -> . invertible-function?)
|
||||
(λ (mn mx)
|
||||
(define d (/ freq (- mx mn)))
|
||||
((make-axis-transform (sine-diag d) (sine-diag-inv d)) mn mx)))
|
||||
|
|
|
@ -56,8 +56,8 @@
|
|||
(defcontract plot-colors/c (or/c (listof plot-color/c)
|
||||
((listof real?) . -> . (listof plot-color/c))))
|
||||
|
||||
(defcontract pen-widths/c (or/c (listof (and/c real? (>=/c 0)))
|
||||
((listof real?) . -> . (listof (and/c real? (>=/c 0))))))
|
||||
(defcontract pen-widths/c (or/c (listof (>=/c 0))
|
||||
((listof real?) . -> . (listof (>=/c 0)))))
|
||||
|
||||
(defcontract plot-pen-styles/c (or/c (listof plot-pen-style/c)
|
||||
((listof real?) . -> . (listof plot-pen-style/c))))
|
||||
|
|
|
@ -29,16 +29,16 @@
|
|||
(defparam plot-background color plot-color/c 0)
|
||||
(defparam plot-foreground-alpha alpha (real-in 0 1) 1)
|
||||
(defparam plot-background-alpha alpha (real-in 0 1) 1)
|
||||
(defparam plot-font-size size (and/c real? (>=/c 0)) 11)
|
||||
(defparam plot-font-size size (>=/c 0) 11)
|
||||
(defparam plot-font-family family font-family/c 'roman)
|
||||
(defparam plot-line-width width (and/c real? (>=/c 0)) 1)
|
||||
(defparam plot-line-width width (>=/c 0) 1)
|
||||
|
||||
(define (pen-gap) (* 2 (plot-line-width)))
|
||||
|
||||
(defparam plot-legend-anchor anchor anchor/c 'top-right)
|
||||
(defparam plot-legend-box-alpha alpha (real-in 0 1) 2/3)
|
||||
|
||||
(defparam plot-tick-size (and/c real? (>=/c 0)) 10)
|
||||
(defparam plot-tick-size (>=/c 0) 10)
|
||||
(defparam plot-tick-skip exact-positive-integer? 2)
|
||||
|
||||
(defparam plot-title (or/c string? #f) #f)
|
||||
|
@ -50,7 +50,7 @@
|
|||
|
||||
(defparam line-samples (and/c exact-integer? (>=/c 2)) 500)
|
||||
(defparam line-color plot-color/c 1)
|
||||
(defparam line-width (and/c real? (>=/c 0)) 1)
|
||||
(defparam line-width (>=/c 0) 1)
|
||||
(defparam line-style plot-pen-style/c 'solid)
|
||||
(defparam line-alpha (real-in 0 1) 1)
|
||||
|
||||
|
@ -59,10 +59,10 @@
|
|||
(defparam interval-color plot-color/c 3)
|
||||
(defparam interval-style plot-brush-style/c 'solid)
|
||||
(defparam interval-line1-color plot-color/c 3)
|
||||
(defparam interval-line1-width (and/c real? (>=/c 0)) 1)
|
||||
(defparam interval-line1-width (>=/c 0) 1)
|
||||
(defparam interval-line1-style plot-pen-style/c 'solid)
|
||||
(defparam interval-line2-color plot-color/c 3)
|
||||
(defparam interval-line2-width (and/c real? (>=/c 0)) 1)
|
||||
(defparam interval-line2-width (>=/c 0) 1)
|
||||
(defparam interval-line2-style plot-pen-style/c 'solid)
|
||||
(defparam interval-alpha (real-in 0 1) 3/4)
|
||||
|
||||
|
@ -70,24 +70,24 @@
|
|||
|
||||
(defparam point-sym point-sym/c 'circle)
|
||||
(defparam point-color plot-color/c 0)
|
||||
(defparam point-size (and/c real? (>=/c 0)) 6)
|
||||
(defparam point-line-width (and/c real? (>=/c 0)) 1)
|
||||
(defparam point-size (>=/c 0) 6)
|
||||
(defparam point-line-width (>=/c 0) 1)
|
||||
(defparam point-alpha (real-in 0 1) 1)
|
||||
|
||||
;; Vector fields
|
||||
|
||||
(defparam vector-field-samples exact-positive-integer? 20)
|
||||
(defparam vector-field-color plot-color/c 1)
|
||||
(defparam vector-field-line-width (and/c real? (>=/c 0)) 2/3)
|
||||
(defparam vector-field-line-width (>=/c 0) 2/3)
|
||||
(defparam vector-field-line-style plot-pen-style/c 'solid)
|
||||
(defparam vector-field-scale (or/c real? (one-of/c 'auto 'normalized)) 'auto)
|
||||
(defparam vector-field-alpha (real-in 0 1) 1)
|
||||
|
||||
;; Error bars
|
||||
|
||||
(defparam error-bar-width (and/c real? (>=/c 0)) 6)
|
||||
(defparam error-bar-width (>=/c 0) 6)
|
||||
(defparam error-bar-color plot-color/c 0)
|
||||
(defparam error-bar-line-width (and/c real? (>=/c 0)) 1)
|
||||
(defparam error-bar-line-width (>=/c 0) 1)
|
||||
(defparam error-bar-line-style plot-pen-style/c 'solid)
|
||||
(defparam error-bar-alpha (real-in 0 1) 2/3)
|
||||
|
||||
|
@ -117,7 +117,7 @@
|
|||
(defparam rectangle-color plot-color/c 3)
|
||||
(defparam rectangle-style plot-brush-style/c 'solid)
|
||||
(defparam rectangle-line-color plot-color/c 3)
|
||||
(defparam rectangle-line-width (and/c real? (>=/c 0)) 1)
|
||||
(defparam rectangle-line-width (>=/c 0) 1)
|
||||
(defparam rectangle-line-style plot-pen-style/c 'solid)
|
||||
(defparam rectangle-alpha (real-in 0 1) 1)
|
||||
(defparam discrete-histogram-gap (real-in 0 1) 1/8)
|
||||
|
@ -134,7 +134,7 @@
|
|||
(defparam label-anchor anchor/c 'left)
|
||||
(defparam label-angle real? 0)
|
||||
(defparam label-alpha (real-in 0 1) 1)
|
||||
(defparam label-point-size (and/c real? (>=/c 0)) 4)
|
||||
(defparam label-point-size (>=/c 0) 4)
|
||||
|
||||
;; Sampling
|
||||
|
||||
|
@ -165,7 +165,7 @@
|
|||
(defparam surface-color plot-color/c 0)
|
||||
(defparam surface-style plot-brush-style/c 'solid)
|
||||
(defparam surface-line-color plot-color/c 0)
|
||||
(defparam surface-line-width (and/c real? (>=/c 0)) 1/3)
|
||||
(defparam surface-line-width (>=/c 0) 1/3)
|
||||
(defparam surface-line-style plot-pen-style/c 'solid)
|
||||
(defparam surface-alpha (real-in 0 1) 1)
|
||||
|
||||
|
@ -194,4 +194,4 @@
|
|||
|
||||
;; Histograms
|
||||
|
||||
(defparam rectangle3d-line-width (and/c real? (>=/c 0)) 1/3)
|
||||
(defparam rectangle3d-line-width (>=/c 0) 1/3)
|
||||
|
|
|
@ -167,7 +167,7 @@
|
|||
|
||||
(defproc (line [f (real? . -> . (or/c real? (vector/c real? real?)))]
|
||||
[#:samples samples (and/c exact-integer? (>=/c 2)) 150]
|
||||
[#:width width (and/c real? (>=/c 0)) 1]
|
||||
[#:width width (>=/c 0) 1]
|
||||
[#:color color plot-color/c 'red]
|
||||
[#:mode mode (one-of/c 'standard 'parametric) 'standard]
|
||||
[#:mapping mapping (one-of/c 'cartesian 'polar) 'cartesian]
|
||||
|
@ -177,7 +177,7 @@
|
|||
|
||||
(defproc (contour [f (real? real? . -> . real?)]
|
||||
[#:samples samples exact-nonnegative-integer? 50]
|
||||
[#:width width (and/c real? (>=/c 0)) 1]
|
||||
[#:width width (>=/c 0) 1]
|
||||
[#:color color plot-color/c 'black]
|
||||
[#:levels levels (or/c (and/c exact-integer? (>=/c 2)) (listof real?)) 10]
|
||||
) ((is-a?/c 2d-plot-area%) . -> . void?)
|
||||
|
@ -191,7 +191,7 @@
|
|||
|
||||
(defproc (surface [f (real? real? . -> . real?)]
|
||||
[#:samples samples (and/c exact-integer? (>=/c 2)) 50]
|
||||
[#:width width (and/c real? (>=/c 0)) 1]
|
||||
[#:width width (>=/c 0) 1]
|
||||
[#:color color plot-color/c 'black]
|
||||
) ((is-a?/c 3d-plot-area%) . -> . void?)
|
||||
(renderer3d->plot-data (surface-renderer f samples width color)))
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
|
||||
(defproc (line [f (real? . -> . (or/c real? (vector/c real? real?)))]
|
||||
[#:samples samples (and/c exact-integer? (>=/c 2)) 150]
|
||||
[#:width width (and/c real? (>=/c 0)) 1]
|
||||
[#:width width (>=/c 0) 1]
|
||||
[#:color color plot-color/c 'red]
|
||||
[#:mode mode (one-of/c 'standard 'parametric) 'standard]
|
||||
[#:mapping mapping (one-of/c 'cartesian 'polar) 'cartesian]
|
||||
|
@ -41,7 +41,7 @@
|
|||
|
||||
(defproc (contour [f (real? real? . -> . real?)]
|
||||
[#:samples samples (and/c exact-integer? (>=/c 2)) 50]
|
||||
[#:width width (and/c real? (>=/c 0)) 1]
|
||||
[#:width width (>=/c 0) 1]
|
||||
[#:color color plot-color/c 'black]
|
||||
[#:levels levels (or/c (and/c exact-integer? (>=/c 2)) (listof real?)) 10]
|
||||
) renderer2d?
|
||||
|
@ -57,7 +57,7 @@
|
|||
|
||||
(defproc (surface [f (real? real? . -> . real?)]
|
||||
[#:samples samples (and/c exact-integer? (>=/c 2)) 50]
|
||||
[#:width width (and/c real? (>=/c 0)) 1]
|
||||
[#:width width (>=/c 0) 1]
|
||||
[#:color color plot-color/c 'black]
|
||||
) renderer3d?
|
||||
(deprecation-warning "surface" "surface3d")
|
||||
|
|
|
@ -182,10 +182,10 @@
|
|||
(defproc (point-label
|
||||
[v (vector/c real? real?)] [label (or/c string? #f) #f]
|
||||
[#:color color plot-color/c (plot-foreground)]
|
||||
[#:size size (and/c real? (>=/c 0)) (plot-font-size)]
|
||||
[#:size size (>=/c 0) (plot-font-size)]
|
||||
[#:anchor anchor anchor/c (label-anchor)]
|
||||
[#:angle angle real? (label-angle)]
|
||||
[#:point-size point-size (and/c real? (>=/c 0)) (label-point-size)]
|
||||
[#:point-size point-size (>=/c 0) (label-point-size)]
|
||||
[#:alpha alpha (real-in 0 1) (label-alpha)]
|
||||
) renderer2d?
|
||||
(match-define (vector x y) v)
|
||||
|
@ -198,10 +198,10 @@
|
|||
[f (real? . -> . (vector/c real? real?))]
|
||||
[t real?] [label (or/c string? #f) #f]
|
||||
[#:color color plot-color/c (plot-foreground)]
|
||||
[#:size size (and/c real? (>=/c 0)) (plot-font-size)]
|
||||
[#:size size (>=/c 0) (plot-font-size)]
|
||||
[#:anchor anchor anchor/c (label-anchor)]
|
||||
[#:angle angle real? (label-angle)]
|
||||
[#:point-size point-size (and/c real? (>=/c 0)) (label-point-size)]
|
||||
[#:point-size point-size (>=/c 0) (label-point-size)]
|
||||
[#:alpha alpha (real-in 0 1) (label-alpha)]
|
||||
) renderer2d?
|
||||
(point-label (match f
|
||||
|
@ -213,10 +213,10 @@
|
|||
(defproc (polar-label
|
||||
[f (real? . -> . real?)] [θ real?] [label (or/c string? #f) #f]
|
||||
[#:color color plot-color/c (plot-foreground)]
|
||||
[#:size size (and/c real? (>=/c 0)) (plot-font-size)]
|
||||
[#:size size (>=/c 0) (plot-font-size)]
|
||||
[#:anchor anchor anchor/c (label-anchor)]
|
||||
[#:angle angle real? (label-angle)]
|
||||
[#:point-size point-size (and/c real? (>=/c 0)) (label-point-size)]
|
||||
[#:point-size point-size (>=/c 0) (label-point-size)]
|
||||
[#:alpha alpha (real-in 0 1) (label-alpha)]
|
||||
) renderer2d?
|
||||
(point-label (polar->cartesian θ (f θ)) label
|
||||
|
@ -226,10 +226,10 @@
|
|||
(defproc (function-label
|
||||
[f (real? . -> . real?)] [x real?] [label (or/c string? #f) #f]
|
||||
[#:color color plot-color/c (plot-foreground)]
|
||||
[#:size size (and/c real? (>=/c 0)) (plot-font-size)]
|
||||
[#:size size (>=/c 0) (plot-font-size)]
|
||||
[#:anchor anchor anchor/c (label-anchor)]
|
||||
[#:angle angle real? (label-angle)]
|
||||
[#:point-size point-size (and/c real? (>=/c 0)) (label-point-size)]
|
||||
[#:point-size point-size (>=/c 0) (label-point-size)]
|
||||
[#:alpha alpha (real-in 0 1) (label-alpha)]
|
||||
) renderer2d?
|
||||
(point-label (vector x (f x)) label
|
||||
|
@ -239,10 +239,10 @@
|
|||
(defproc (inverse-label
|
||||
[f (real? . -> . real?)] [y real?] [label (or/c string? #f) #f]
|
||||
[#:color color plot-color/c (plot-foreground)]
|
||||
[#:size size (and/c real? (>=/c 0)) (plot-font-size)]
|
||||
[#:size size (>=/c 0) (plot-font-size)]
|
||||
[#:anchor anchor anchor/c (label-anchor)]
|
||||
[#:angle angle real? (label-angle)]
|
||||
[#:point-size point-size (and/c real? (>=/c 0)) (label-point-size)]
|
||||
[#:point-size point-size (>=/c 0) (label-point-size)]
|
||||
[#:alpha alpha (real-in 0 1) (label-alpha)]
|
||||
) renderer2d?
|
||||
(point-label (vector (f y) y) label
|
||||
|
|
|
@ -48,10 +48,10 @@
|
|||
[#:color color plot-color/c (interval-color)]
|
||||
[#:style style plot-brush-style/c (interval-style)]
|
||||
[#:line1-color line1-color plot-color/c (interval-line1-color)]
|
||||
[#:line1-width line1-width (and/c real? (>=/c 0)) (interval-line1-width)]
|
||||
[#:line1-width line1-width (>=/c 0) (interval-line1-width)]
|
||||
[#:line1-style line1-style plot-pen-style/c (interval-line1-style)]
|
||||
[#:line2-color line2-color plot-color/c (interval-line2-color)]
|
||||
[#:line2-width line2-width (and/c real? (>=/c 0)) (interval-line2-width)]
|
||||
[#:line2-width line2-width (>=/c 0) (interval-line2-width)]
|
||||
[#:line2-style line2-style plot-pen-style/c (interval-line2-style)]
|
||||
[#:alpha alpha (real-in 0 1) (interval-alpha)]
|
||||
[#:label label (or/c string? #f) #f]
|
||||
|
@ -83,10 +83,10 @@
|
|||
[#:color color plot-color/c (interval-color)]
|
||||
[#:style style plot-brush-style/c (interval-style)]
|
||||
[#:line1-color line1-color plot-color/c (interval-line1-color)]
|
||||
[#:line1-width line1-width (and/c real? (>=/c 0)) (interval-line1-width)]
|
||||
[#:line1-width line1-width (>=/c 0) (interval-line1-width)]
|
||||
[#:line1-style line1-style plot-pen-style/c (interval-line1-style)]
|
||||
[#:line2-color line2-color plot-color/c (interval-line2-color)]
|
||||
[#:line2-width line2-width (and/c real? (>=/c 0)) (interval-line2-width)]
|
||||
[#:line2-width line2-width (>=/c 0) (interval-line2-width)]
|
||||
[#:line2-style line2-style plot-pen-style/c (interval-line2-style)]
|
||||
[#:alpha alpha (real-in 0 1) (interval-alpha)]
|
||||
[#:label label (or/c string? #f) #f]
|
||||
|
@ -109,10 +109,10 @@
|
|||
[#:color color plot-color/c (interval-color)]
|
||||
[#:style style plot-brush-style/c (interval-style)]
|
||||
[#:line1-color line1-color plot-color/c (interval-line1-color)]
|
||||
[#:line1-width line1-width (and/c real? (>=/c 0)) (interval-line1-width)]
|
||||
[#:line1-width line1-width (>=/c 0) (interval-line1-width)]
|
||||
[#:line1-style line1-style plot-pen-style/c (interval-line1-style)]
|
||||
[#:line2-color line2-color plot-color/c (interval-line2-color)]
|
||||
[#:line2-width line2-width (and/c real? (>=/c 0)) (interval-line2-width)]
|
||||
[#:line2-width line2-width (>=/c 0) (interval-line2-width)]
|
||||
[#:line2-style line2-style plot-pen-style/c (interval-line2-style)]
|
||||
[#:alpha alpha (real-in 0 1) (interval-alpha)]
|
||||
[#:label label (or/c string? #f) #f]
|
||||
|
@ -155,10 +155,10 @@
|
|||
[#:color color plot-color/c (interval-color)]
|
||||
[#:style style plot-brush-style/c (interval-style)]
|
||||
[#:line1-color line1-color plot-color/c (interval-line1-color)]
|
||||
[#:line1-width line1-width (and/c real? (>=/c 0)) (interval-line1-width)]
|
||||
[#:line1-width line1-width (>=/c 0) (interval-line1-width)]
|
||||
[#:line1-style line1-style plot-pen-style/c (interval-line1-style)]
|
||||
[#:line2-color line2-color plot-color/c (interval-line2-color)]
|
||||
[#:line2-width line2-width (and/c real? (>=/c 0)) (interval-line2-width)]
|
||||
[#:line2-width line2-width (>=/c 0) (interval-line2-width)]
|
||||
[#:line2-style line2-style plot-pen-style/c (interval-line2-style)]
|
||||
[#:alpha alpha (real-in 0 1) (interval-alpha)]
|
||||
[#:label label (or/c string? #f) #f]
|
||||
|
@ -202,10 +202,10 @@
|
|||
[#:color color plot-color/c (interval-color)]
|
||||
[#:style style plot-brush-style/c (interval-style)]
|
||||
[#:line1-color line1-color plot-color/c (interval-line1-color)]
|
||||
[#:line1-width line1-width (and/c real? (>=/c 0)) (interval-line1-width)]
|
||||
[#:line1-width line1-width (>=/c 0) (interval-line1-width)]
|
||||
[#:line1-style line1-style plot-pen-style/c (interval-line1-style)]
|
||||
[#:line2-color line2-color plot-color/c (interval-line2-color)]
|
||||
[#:line2-width line2-width (and/c real? (>=/c 0)) (interval-line2-width)]
|
||||
[#:line2-width line2-width (>=/c 0) (interval-line2-width)]
|
||||
[#:line2-style line2-style plot-pen-style/c (interval-line2-style)]
|
||||
[#:alpha alpha (real-in 0 1) (interval-alpha)]
|
||||
[#:label label (or/c string? #f) #f]
|
||||
|
|
|
@ -136,7 +136,7 @@
|
|||
[#:y-min y-min (or/c real? #f) #f] [#:y-max y-max (or/c real? #f) #f]
|
||||
[#:samples samples (and/c exact-integer? (>=/c 2)) (line-samples)]
|
||||
[#:color color plot-color/c (line-color)]
|
||||
[#:width width (and/c real? (>=/c 0)) (line-width)]
|
||||
[#:width width (>=/c 0) (line-width)]
|
||||
[#:style style plot-pen-style/c (line-style)]
|
||||
[#:alpha alpha (real-in 0 1) (line-alpha)]
|
||||
[#:label label (or/c string? #f) #f]
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
[#:x-min x-min (or/c real? #f) #f] [#:x-max x-max (or/c real? #f) #f]
|
||||
[#:y-min y-min (or/c real? #f) #f] [#:y-max y-max (or/c real? #f) #f]
|
||||
[#:color color plot-color/c (line-color)]
|
||||
[#:width width (and/c real? (>=/c 0)) (line-width)]
|
||||
[#:width width (>=/c 0) (line-width)]
|
||||
[#:style style plot-pen-style/c (line-style)]
|
||||
[#:alpha alpha (real-in 0 1) (line-alpha)]
|
||||
[#:label label (or/c string? #f) #f]
|
||||
|
@ -55,7 +55,7 @@
|
|||
[#:y-min y-min (or/c real? #f) #f] [#:y-max y-max (or/c real? #f) #f]
|
||||
[#:samples samples (and/c exact-integer? (>=/c 2)) (line-samples)]
|
||||
[#:color color plot-color/c (line-color)]
|
||||
[#:width width (and/c real? (>=/c 0)) (line-width)]
|
||||
[#:width width (>=/c 0) (line-width)]
|
||||
[#:style style plot-pen-style/c (line-style)]
|
||||
[#:alpha alpha (real-in 0 1) (line-alpha)]
|
||||
[#:label label (or/c string? #f) #f]
|
||||
|
@ -71,7 +71,7 @@
|
|||
[#:y-min y-min (or/c real? #f) #f] [#:y-max y-max (or/c real? #f) #f]
|
||||
[#:samples samples (and/c exact-integer? (>=/c 2)) (line-samples)]
|
||||
[#:color color plot-color/c (line-color)]
|
||||
[#:width width (and/c real? (>=/c 0)) (line-width)]
|
||||
[#:width width (>=/c 0) (line-width)]
|
||||
[#:style style plot-pen-style/c (line-style)]
|
||||
[#:alpha alpha (real-in 0 1) (line-alpha)]
|
||||
[#:label label (or/c string? #f) #f]
|
||||
|
@ -101,7 +101,7 @@
|
|||
[#:y-min y-min (or/c real? #f) #f] [#:y-max y-max (or/c real? #f) #f]
|
||||
[#:samples samples (and/c exact-integer? (>=/c 2)) (line-samples)]
|
||||
[#:color color plot-color/c (line-color)]
|
||||
[#:width width (and/c real? (>=/c 0)) (line-width)]
|
||||
[#:width width (>=/c 0) (line-width)]
|
||||
[#:style style plot-pen-style/c (line-style)]
|
||||
[#:alpha alpha (real-in 0 1) (line-alpha)]
|
||||
[#:label label (or/c string? #f) #f]
|
||||
|
@ -132,7 +132,7 @@
|
|||
[#:x-min x-min (or/c real? #f) #f] [#:x-max x-max (or/c real? #f) #f]
|
||||
[#:samples samples (and/c exact-integer? (>=/c 2)) (line-samples)]
|
||||
[#:color color plot-color/c (line-color)]
|
||||
[#:width width (and/c real? (>=/c 0)) (line-width)]
|
||||
[#:width width (>=/c 0) (line-width)]
|
||||
[#:style style plot-pen-style/c (line-style)]
|
||||
[#:alpha alpha (real-in 0 1) (line-alpha)]
|
||||
[#:label label (or/c string? #f) #f]
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
|
||||
(defproc (plot/dc [renderer-tree (treeof renderer2d?)]
|
||||
[dc (is-a?/c dc<%>)]
|
||||
[x real?] [y real?] [width (and/c real? (>=/c 0))] [height (and/c real? (>=/c 0))]
|
||||
[x real?] [y real?] [width (>=/c 0)] [height (>=/c 0)]
|
||||
[#:x-min x-min (or/c real? #f) #f]
|
||||
[#:x-max x-max (or/c real? #f) #f]
|
||||
[#:y-min y-min (or/c real? #f) #f]
|
||||
|
|
|
@ -30,8 +30,8 @@
|
|||
[#:y-min y-min (or/c real? #f) #f] [#:y-max y-max (or/c real? #f) #f]
|
||||
[#:sym sym point-sym/c (point-sym)]
|
||||
[#:color color plot-color/c (point-color)]
|
||||
[#:size size (and/c real? (>=/c 0)) (point-size)]
|
||||
[#:line-width line-width (and/c real? (>=/c 0)) (point-line-width)]
|
||||
[#:size size (>=/c 0) (point-size)]
|
||||
[#:line-width line-width (>=/c 0) (point-line-width)]
|
||||
[#:alpha alpha (real-in 0 1) (point-alpha)]
|
||||
[#:label label (or/c string? #f) #f]
|
||||
) renderer2d?
|
||||
|
@ -100,7 +100,7 @@
|
|||
[#:samples samples exact-positive-integer? (vector-field-samples)]
|
||||
[#:scale scale (or/c real? (one-of/c 'auto 'normalized)) (vector-field-scale)]
|
||||
[#:color color plot-color/c (vector-field-color)]
|
||||
[#:line-width line-width (and/c real? (>=/c 0)) (vector-field-line-width)]
|
||||
[#:line-width line-width (>=/c 0) (vector-field-line-width)]
|
||||
[#:line-style line-style plot-pen-style/c (vector-field-line-style)]
|
||||
[#:alpha alpha (real-in 0 1) (vector-field-alpha)]
|
||||
[#:label label (or/c string? #f) #f]
|
||||
|
@ -158,9 +158,9 @@
|
|||
[#:x-min x-min (or/c real? #f) #f] [#:x-max x-max (or/c real? #f) #f]
|
||||
[#:y-min y-min (or/c real? #f) #f] [#:y-max y-max (or/c real? #f) #f]
|
||||
[#:color color plot-color/c (error-bar-color)]
|
||||
[#:line-width line-width (and/c real? (>=/c 0)) (error-bar-line-width)]
|
||||
[#:line-style line-style (and/c real? (>=/c 0)) (error-bar-line-style)]
|
||||
[#:width width (and/c real? (>=/c 0)) (error-bar-width)]
|
||||
[#:line-width line-width (>=/c 0) (error-bar-line-width)]
|
||||
[#:line-style line-style plot-pen-style/c (error-bar-line-style)]
|
||||
[#:width width (>=/c 0) (error-bar-width)]
|
||||
[#:alpha alpha (real-in 0 1) (error-bar-alpha)]
|
||||
) renderer2d?
|
||||
(let ([bars (filter vregular? bars)])
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
[#:color color plot-color/c (rectangle-color)]
|
||||
[#:style style plot-brush-style/c (rectangle-style)]
|
||||
[#:line-color line-color plot-color/c (rectangle-line-color)]
|
||||
[#:line-width line-width (and/c real? (>=/c 0)) (rectangle-line-width)]
|
||||
[#:line-width line-width (>=/c 0) (rectangle-line-width)]
|
||||
[#:line-style line-style plot-pen-style/c (rectangle-line-style)]
|
||||
[#:alpha alpha (real-in 0 1) (rectangle-alpha)]
|
||||
[#:label label (or/c string? #f) #f]
|
||||
|
@ -70,7 +70,7 @@
|
|||
[#:color color plot-color/c (rectangle-color)]
|
||||
[#:style style plot-brush-style/c (rectangle-style)]
|
||||
[#:line-color line-color plot-color/c (rectangle-line-color)]
|
||||
[#:line-width line-width (and/c real? (>=/c 0)) (rectangle-line-width)]
|
||||
[#:line-width line-width (>=/c 0) (rectangle-line-width)]
|
||||
[#:line-style line-style plot-pen-style/c (rectangle-line-style)]
|
||||
[#:alpha alpha (real-in 0 1) (rectangle-alpha)]
|
||||
[#:label label (or/c string? #f) #f]
|
||||
|
@ -112,7 +112,7 @@
|
|||
[#:color color plot-color/c (rectangle-color)]
|
||||
[#:style style plot-brush-style/c (rectangle-style)]
|
||||
[#:line-color line-color plot-color/c (rectangle-line-color)]
|
||||
[#:line-width line-width (and/c real? (>=/c 0)) (rectangle-line-width)]
|
||||
[#:line-width line-width (>=/c 0) (rectangle-line-width)]
|
||||
[#:line-style line-style plot-pen-style/c (rectangle-line-style)]
|
||||
[#:alpha alpha (real-in 0 1) (rectangle-alpha)]
|
||||
[#:label label (or/c string? #f) #f]
|
||||
|
|
|
@ -77,7 +77,7 @@
|
|||
[#:samples samples (and/c exact-integer? (>=/c 2)) (plot3d-samples)]
|
||||
[#:color color plot-color/c (surface-color)]
|
||||
[#:line-color line-color plot-color/c (surface-line-color)]
|
||||
[#:line-width line-width (and/c real? (>=/c 0)) (surface-line-width)]
|
||||
[#:line-width line-width (>=/c 0) (surface-line-width)]
|
||||
[#:line-style line-style plot-pen-style/c (surface-line-style)]
|
||||
[#:alpha alpha (real-in 0 1) (surface-alpha)]
|
||||
[#:label label (or/c string? #f) #f]
|
||||
|
@ -256,7 +256,7 @@
|
|||
[#:samples samples (and/c exact-integer? (>=/c 2)) (plot3d-samples)]
|
||||
[#:color color plot-color/c (surface-color)]
|
||||
[#:line-color line-color plot-color/c (surface-line-color)]
|
||||
[#:line-width line-width (and/c real? (>=/c 0)) (surface-line-width)]
|
||||
[#:line-width line-width (>=/c 0) (surface-line-width)]
|
||||
[#:line-style line-style plot-pen-style/c (surface-line-style)]
|
||||
[#:alpha alpha (real-in 0 1) (surface-alpha)]
|
||||
[#:label label (or/c string? #f) #f]
|
||||
|
|
|
@ -45,7 +45,7 @@
|
|||
[#:y-min y-min (or/c real? #f) #f] [#:y-max y-max (or/c real? #f) #f]
|
||||
[#:z-min z-min (or/c real? #f) #f] [#:z-max z-max (or/c real? #f) #f]
|
||||
[#:color color plot-color/c (line-color)]
|
||||
[#:width width (and/c real? (>=/c 0)) (line-width)]
|
||||
[#:width width (>=/c 0) (line-width)]
|
||||
[#:style style plot-pen-style/c (line-style)]
|
||||
[#:alpha alpha (real-in 0 1) (line-alpha)]
|
||||
[#:label label (or/c string? #f) #f]
|
||||
|
@ -60,7 +60,7 @@
|
|||
[#:z-min z-min (or/c real? #f) #f] [#:z-max z-max (or/c real? #f) #f]
|
||||
[#:samples samples (and/c exact-integer? (>=/c 2)) (line-samples)]
|
||||
[#:color color plot-color/c (line-color)]
|
||||
[#:width width (and/c real? (>=/c 0)) (line-width)]
|
||||
[#:width width (>=/c 0) (line-width)]
|
||||
[#:style style plot-pen-style/c (line-style)]
|
||||
[#:alpha alpha (real-in 0 1) (line-alpha)]
|
||||
[#:label label (or/c string? #f) #f]
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
|
||||
(defproc (plot3d/dc [renderer-tree (treeof renderer3d?)]
|
||||
[dc (is-a?/c dc<%>)]
|
||||
[x real?] [y real?] [width (and/c real? (>=/c 0))] [height (and/c real? (>=/c 0))]
|
||||
[x real?] [y real?] [width (>=/c 0)] [height (>=/c 0)]
|
||||
[#:x-min x-min (or/c real? #f) #f] [#:x-max x-max (or/c real? #f) #f]
|
||||
[#:y-min y-min (or/c real? #f) #f] [#:y-max y-max (or/c real? #f) #f]
|
||||
[#:z-min z-min (or/c real? #f) #f] [#:z-max z-max (or/c real? #f) #f]
|
||||
|
|
|
@ -27,8 +27,8 @@
|
|||
[#:z-min z-min (or/c real? #f) #f] [#:z-max z-max (or/c real? #f) #f]
|
||||
[#:sym sym point-sym/c (point-sym)]
|
||||
[#:color color plot-color/c (point-color)]
|
||||
[#:size size (and/c real? (>=/c 0)) (point-size)]
|
||||
[#:line-width line-width (and/c real? (>=/c 0)) (point-line-width)]
|
||||
[#:size size (>=/c 0) (point-size)]
|
||||
[#:line-width line-width (>=/c 0) (point-line-width)]
|
||||
[#:alpha alpha (real-in 0 1) (point-alpha)]
|
||||
[#:label label (or/c string? #f) #f]
|
||||
) renderer3d?
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
[#:color color plot-color/c (rectangle-color)]
|
||||
[#:style style plot-brush-style/c (rectangle-style)]
|
||||
[#:line-color line-color plot-color/c (rectangle-line-color)]
|
||||
[#:line-width line-width (and/c real? (>=/c 0)) (rectangle3d-line-width)]
|
||||
[#:line-width line-width (>=/c 0) (rectangle3d-line-width)]
|
||||
[#:line-style line-style plot-pen-style/c (rectangle-line-style)]
|
||||
[#:alpha alpha (real-in 0 1) (rectangle-alpha)]
|
||||
[#:label label (or/c string? #f) #f]
|
||||
|
@ -88,7 +88,7 @@
|
|||
[#:color color plot-color/c (rectangle-color)]
|
||||
[#:style style plot-brush-style/c (rectangle-style)]
|
||||
[#:line-color line-color plot-color/c (rectangle-line-color)]
|
||||
[#:line-width line-width (and/c real? (>=/c 0)) (rectangle3d-line-width)]
|
||||
[#:line-width line-width (>=/c 0) (rectangle3d-line-width)]
|
||||
[#:line-style line-style plot-pen-style/c (rectangle-line-style)]
|
||||
[#:alpha alpha (real-in 0 1) (rectangle-alpha)]
|
||||
[#:label label (or/c string? #f) #f]
|
||||
|
|
|
@ -55,7 +55,7 @@
|
|||
[#:color color plot-color/c (surface-color)]
|
||||
[#:style style plot-brush-style/c (surface-style)]
|
||||
[#:line-color line-color plot-color/c (surface-line-color)]
|
||||
[#:line-width line-width (and/c real? (>=/c 0)) (surface-line-width)]
|
||||
[#:line-width line-width (>=/c 0) (surface-line-width)]
|
||||
[#:line-style line-style plot-pen-style/c (surface-line-style)]
|
||||
[#:alpha alpha (real-in 0 1) (surface-alpha)]
|
||||
[#:label label (or/c string? #f) #f]
|
||||
|
|
Loading…
Reference in New Issue
Block a user