Fixed erroneous raised exception when plotting outside the bounds of
a 2D contour plot Please merge to 5.3.2
This commit is contained in:
parent
22d1619058
commit
ecd43f7579
|
@ -62,6 +62,9 @@
|
||||||
(define num (animated-samples samples))
|
(define num (animated-samples samples))
|
||||||
(define sample (g (vector x-ivl y-ivl) (vector num num)))
|
(define sample (g (vector x-ivl y-ivl) (vector num num)))
|
||||||
(match-define (2d-sample xs ys zss z-min z-max) sample)
|
(match-define (2d-sample xs ys zss z-min z-max) sample)
|
||||||
|
|
||||||
|
(unless (and z-min z-max) (return empty))
|
||||||
|
|
||||||
(match-define (list (tick zs _ labels) ...) (contour-ticks (plot-z-ticks) z-min z-max levels #f))
|
(match-define (list (tick zs _ labels) ...) (contour-ticks (plot-z-ticks) z-min z-max levels #f))
|
||||||
|
|
||||||
;; need to check this or in-cycle below does an infinite loop (I think it's an in-cycle bug)
|
;; need to check this or in-cycle below does an infinite loop (I think it's an in-cycle bug)
|
||||||
|
@ -120,6 +123,9 @@
|
||||||
(define num (animated-samples samples))
|
(define num (animated-samples samples))
|
||||||
(define sample (g (vector x-ivl y-ivl) (vector num num)))
|
(define sample (g (vector x-ivl y-ivl) (vector num num)))
|
||||||
(match-define (2d-sample xs ys zss z-min z-max) sample)
|
(match-define (2d-sample xs ys zss z-min z-max) sample)
|
||||||
|
|
||||||
|
(unless (and z-min z-max) (return empty))
|
||||||
|
|
||||||
(match-define (list (tick zs _ labels) ...) (contour-ticks (plot-z-ticks) z-min z-max levels #t))
|
(match-define (list (tick zs _ labels) ...) (contour-ticks (plot-z-ticks) z-min z-max levels #t))
|
||||||
|
|
||||||
(define-values (z-ivls ivl-labels)
|
(define-values (z-ivls ivl-labels)
|
||||||
|
|
|
@ -308,6 +308,10 @@
|
||||||
#:widths '(2) #:styles '(dot)))
|
#:widths '(2) #:styles '(dot)))
|
||||||
#:x-min -5 #:x-max 5 #:y-min -5 #:y-max 5))
|
#:x-min -5 #:x-max 5 #:y-min -5 #:y-max 5))
|
||||||
|
|
||||||
|
;; Both plots should be blank
|
||||||
|
(plot (contours f2 -5 0) #:x-min 1 #:x-max 3 #:y-min 1 #:y-max 3)
|
||||||
|
(plot (contour-intervals f2 -5 0) #:x-min 1 #:x-max 3 #:y-min 1 #:y-max 3)
|
||||||
|
|
||||||
(time (plot (contour-intervals f1 -5 5 -5 5 #:label "z")))
|
(time (plot (contour-intervals f1 -5 5 -5 5 #:label "z")))
|
||||||
|
|
||||||
(time (plot (contour-intervals
|
(time (plot (contour-intervals
|
||||||
|
|
Loading…
Reference in New Issue
Block a user