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:
Neil Toronto 2013-01-17 21:28:53 -07:00
parent 22d1619058
commit ecd43f7579
2 changed files with 10 additions and 0 deletions

View File

@ -62,6 +62,9 @@
(define num (animated-samples samples))
(define sample (g (vector x-ivl y-ivl) (vector num num)))
(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))
;; 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 sample (g (vector x-ivl y-ivl) (vector num num)))
(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))
(define-values (z-ivls ivl-labels)

View File

@ -308,6 +308,10 @@
#:widths '(2) #:styles '(dot)))
#: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