[racket-dev] New plot library [Was: (to Jay) Re: What I'm working on]

From: Neil Toronto (neil.toronto at gmail.com)
Date: Sat Aug 27 22:33:12 EDT 2011

On 08/27/2011 11:26 AM, Aaron Turon wrote:
> Hi Neil,
> I've been using the new plot library for visualizing some benchmark
> results in three dimensions (# threads, amount of work, throughput).
> It's very easy to use, and the interactive 3d plots are great.  I also
> plan to use the PDF export for my next paper.  Thanks for making this
> available!

You're welcome!

My evil master plan is to beat R and come close to Mathematica, to 
remove one more reason for statisticians and other applied 
mathematicians to use something other than Racket. I'm going after the 
statisticians first, though.

> My only request: a version of surface3d that takes as input a list of
> discrete points.  I find the surface visualization more useful than a
> scatter plot, but I've had to code my own interpolation to make it
> work.  I'm guessing surface3d is already doing its own interpolation
> (and of course sampling) so coding my own seems redundant.

I'll put something like that on my to-do list. As it is, 'surface3d' 
only appears to interpolate bilinearly because it uses sampled x,y,z 
coordinates as quad vertexes. But I don't think it would be hard to make 
it do bilinear interpolation for non-grid x,y coordinates, to come up 
with z values for grid x,y coordinates.

(Oh, hang on. The contour line endpoints are interpolated - it's part of 
the marching squares algorithm - so there's that.)

FWIW, the latest update I pushed added contracts to all the 2D plot
functions and parameters, and some incomplete documentation for them. 
(Run "build.sh" in the "scribblings" directory. Check out the quick 
start.) It also minimizes the margins on 3D plots, does better depth 
sorting, and handles NaNs and Infs, which you'll probably appreciate. I 
think the only major change it would impose on you is replacing 'mix' 
and 'mix3d' with 'list'.

Neil T

Posted on the dev mailing list.