[racket-dev] New plot library [Was: (to Jay) Re: What I'm working on]
On 08/02/2011 01:28 PM, Eli Barzilay wrote:
> About a minute ago, Matthew Flatt wrote:
>> At Tue, 2 Aug 2011 16:20:43 -0400, Eli Barzilay wrote:
>>> This replacement would be great -- it's pretty bad now that it
>>> goes out to a(n outdated) C library with inferior graphic
>>> capabilities, draws the graph into a temporary file which is then
>>> loaded back in Racket.
>> No, the current plot draws via dc<%> to a bitmap. I threw out the
>> old back end and installed callbacks that use `racket/draw' as of
>> v5.1.
> Ah, so that probably makes things even easier for Neil.
I wish it did! But the current stuff still uses libplplot via FFI.
Matthew's overhaul makes libplplot render to a dc<%> instead of saving
to a file. The rendering pipeline looks like
plot -> FFI interface -> libplplot frontend -> dc backend -> dc
Also, computing *what* to send to the dc is written in C. That's why the
plots are still 1998-ugly, and why it's easier to code "plot -> dc" from
scratch.
>> The pixels changed a lot with that switch, of course, so I don't
>> think anyone cares about changes at that level.
>
That's good to know. Thanks!
Neil T