2011/1/17 Milan Markovic <zivoti...@gmail.com>:
> [...]
> I was wondering if I could save a plot directly to an image file without
> having to "fish" it out of the REPL and right click.
> [...]

Hello Milan,

plot views support the convertible protocol. Try something like this:

  #lang racket/base
  (require file/convertible plot)
  (convert (plot (line sin)) 'png-bytes)

The result of this call is a byte string that can be written to a PNG
file.


Ciao,
Thomas


-- 
When C++ is your hammer, every problem looks like your thumb.
_________________________________________________
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/users

Reply via email to