[plt-dev] bug in plot?

From: Matthias Felleisen (matthias at ccs.neu.edu)
Date: Fri Dec 4 10:20:05 EST 2009

Eli, how much work would it be to implement plot in Scheme? At the time we had a reason to go with the gnu package -- Matthias


On Dec 4, 2009, at 10:16 AM, Robby Findler wrote:

> Yes, I can tell that the drawing is not using mred's library (it looks
> much worse that mred's library). I had guessed it might be an FFI
> issue with numbers.
> 
> Robby
> 
> On Fri, Dec 4, 2009 at 8:51 AM, Eli Barzilay <eli at barzilay.org> wrote:
>> On Dec  4, Robby Findler wrote:
>>> I think that this is a bug in plot. The plot that shows up seems to
>>> have negative numbers, but this function is positive everywhere. Is it
>>> possible this is an ffi bug?
>>> 
>>> (plot (line (λ (x) (expt (expt pi x) x)))
>>>       #:x-min -10
>>>       #:x-max 10
>>>       #:y-min -100000
>>>       #:y-max 100000)
>> 
>> Looks like some kind of a problem in the way it draws really big
>> numbers.  I don't remember the details, but I think that it calls out
>> to Scheme to return the numbers, but the drawing etc is all in C.
>> (For no good reason -- the whole thing can be done much better in
>> Scheme....)
>> 
>> --
>>          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
>>                    http://barzilay.org/                   Maze is Life!
>> 
> _________________________________________________
>  For list-related administrative tasks:
>  http://list.cs.brown.edu/mailman/listinfo/plt-dev



Posted on the dev mailing list.