<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><br></div><div>Contrary to the docs, a plot-view inherits from image-snip, which means you should be able to get the bitmap and from there you should be able to write things to a file. (See below.)&nbsp;</div><div><br></div><div>But this is clearly an oversight and calls for an extension. Then again, perhaps I am overlooking things -- Matthias</div><div><br></div><div><blockquote type="cite"><div><font class="Apple-style-span" color="#000000">#lang racket/gui</font></div><div><font class="Apple-style-span" color="#000000"><br></font></div><div><font class="Apple-style-span" color="#000000">(require plot)</font></div><div><font class="Apple-style-span" color="#000000"><br></font></div><div><font class="Apple-style-span" color="#000000">(define id:plot (plot (line (lambda (x) x))))</font></div><div><font class="Apple-style-span" color="#000000"><br></font></div><div><font class="Apple-style-span" color="#000000">(is-a? id:plot image-snip%)</font></div><div><font class="Apple-style-span" color="#000000"><br></font></div><div><font class="Apple-style-span" color="#000000">(define id:bitmap (send id:plot get-bitmap))&nbsp;</font></div><div><font class="Apple-style-span" color="#000000"><br></font></div><div><font class="Apple-style-span" color="#000000">(send id:bitmap save-file "test.png" 'png)</font></div></blockquote></div><div><br></div><div><br></div><div><br></div><br><div><div>On Jan 17, 2011, at 7:18 AM, Milan Markovic wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">Hello everybody,<div><br></div><div>I looked several times through the docs and couldn't find anything to solve my problem.</div><div><br></div><div>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. I am looking into automatically creating a series of graphs directly evaluating scheme code, therefore using gplot lib, which is also pretty good would be an overkill.</div>
<div><br></div><div>Any ideas?</div><div><br></div><div>Thnx,</div><div>Milan</div>
_________________________________________________<br> &nbsp;For list-related administrative tasks:<br> &nbsp;<a href="http://lists.racket-lang.org/listinfo/users">http://lists.racket-lang.org/listinfo/users</a></blockquote></div><br></body></html>