On 05/11/2012 12:48 PM, prad wrote:
> Neil Toronto<neil.toronto at gmail.com>
> writes:
>>> On 05/11/2012 11:44 AM, prad wrote:
>>> i'm not using drscheme.
>>>>>> how do i display things like
>>> (object:2d-view% ...)
>>> which are produced when we use plot etc.
>>>>>> if i run a racket program from command line?
>>>>>> i thought there might be something like a show function, but it doesn't
>>> seem to be in
>>> #lang racket
>>>> Start your interactions with `(plot-new-window? #t)' (without the
>> quotes). Every call to `plot' or `plot3d' will then display the plot
>> in a new frame.
>>>> It sounds like you don't need programmatic control over the frames,
>> but if you do, use `plot-frame' and `plot3d-frame'.
>>>> Neil ⊥
>>> thx neil (and azumu).
> there doesn't seem to be a
>> plot-new-window?
> or
> plot-frame
>> after i do
> (require plot)
>> aren't these functions part of plot?
>>> nor does it help if i change
> #lang racket
> to
> #lang slideshow
>>> for instance, this program doesn't work in drscheme:
>> #lang slideshow
> (require plot)
>> (plot-font-size (current-font-size))
> (plot-width (current-para-width))
> (plot-height 600)
> (plot-background-alpha 1/2)
>> (slide
> #:title "A 2D Parabola"
> (plot-pict (function sqr -1 1 #:label "y = x^2")))
>> because it doesn't know what plot-font-size or plot-width is.
> the program is from:
>http://docs.racket-lang.org/plot/plot2d.html?q=plot-frame#%28def._%28%28lib._plot/main..rkt%29._plot-frame%29%29>>> so what am i missing here?
> (i'm on debian, but have installed racket v5.1)
Oh, that's the problem. I added all those plot goodies in v5.2, when I
reimplemented it in Racket. I hope you're not stuck with v5.1. :/
Neil ⊥