[racket-dev] Plot Contour Intervals Question (Bug?)

From: Doug Williams (m.douglas.williams at gmail.com)
Date: Fri Aug 3 13:59:49 EDT 2012

Here is a simple contour-interval example that I don't understand. [We
are changing out some uses of shade in older code when I came across
something I simplified to this.]

Consider the following simple program.

(require plot)

(plot (contour-intervals
       (lambda (x y)
         (define z (- x y))
         (cond ((< z -1) -1)
               ((> z 1) 1)
               (else z)))
       -2 2 -2 2))

Whose output is attached.

Why is the lower white triangle not colored red - they definitely have
a value of 1? It's like those points are completely ignored.

Doug
-------------- next part --------------
A non-text attachment was scrubbed...
Name: untitled.png
Type: image/png
Size: 21141 bytes
Desc: not available
URL: <http://lists.racket-lang.org/dev/archive/attachments/20120803/31281a9d/attachment-0001.png>

Posted on the dev mailing list.