[racket] use plot as render in universe

From: J G Cho (gcho at fundingmatters.com)
Date: Sat Aug 10 19:04:13 EDT 2013

I get an error (somewhat expectedly) when I try

  (big-bang init
            (on-tick random-walk 1)
            ;(on-key door-actions)
            (to-draw plot-render)
            ))

where plot-render is defined as

(define (plot-render world)
  (p:plot (p:lines
         (world->list-of-vectors world)
         #:color 6 #:label "Random walk")))

with the following at the top

(require (prefix-in p: plot))

The error msg is

plot: could not determine sensible plot bounds; got x ∈ [0,0], y ∈ [1,1]

Is there way to let plot know of the context? Or pass a context to plot and
extract the pixels and hand it over to via some proc in 2htdp/image? Or
maybe there is a simple way?

jGc
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20130810/2b59425b/attachment.html>

Posted on the users mailing list.