[racket] Typed Racket interface to plot
Working from Ray Racine's initial Typed Racket interface to `plot', I've
added the module `plot/typed'. It should be in the next nightly build,
if something I did earlier for it doesn't continue to break the build.
It shouldn't. :D
Example use:
#lang typed/racket
(require math plot/typed)
(plot3d (contour-intervals3d
(λ: ([x : Real] [y : Real])
(/ (gamma x) (gamma y)))
0.25 2 0.25 2)
#:angle 250
#:out-file "gamma-ratio.pdf")
Every documented `plot' and `plot/utils' export is now typed, and they
pass the new `plot/typed' tests. There are probably small errors remaining.
Two things to note:
* For Typed Racket users: non-keyword optional arguments are currently
required. We're waiting on a fix in TR for this. It shouldn't take
long. In the meantime, including all non-keyword arguments doesn't
seem to be a serious imposition, because they're usually required to
get sensible plot bounds. (For multiple plots, use `#f'.)
* For all plot users: functions that used to accept lists and vectors
now accept arbitrary sequences and sequences of sequences. Even the
function passed to `vector-field' can return a sequence.
Ray: thanks a ton for doing most of it. It took me just over a day
instead of a week because of your initial work.
Neil ⊥