Re: R-alpha: plot f(x,y)

Ross Ihaka (
Wed, 31 Jul 1996 12:00:36 +1200

Date: Wed, 31 Jul 1996 12:00:36 +1200
From: Ross Ihaka <>
Message-Id: <>
To: Peter Dalgaard BSA <>
Subject: Re: R-alpha: plot f(x,y)
In-Reply-To: <>

Peter Dalgaard writes:
 > In article <> Bill Simpson <> writes:
 >    In Splus one can plot f(x,y) with 
 >    image
 >    persp
 >    contour
 >    These doe plans to make one of these available?
 > Er? Say what?
 >    Failing that, does anyone have code allowing one to do these things in R?
 > Hm. I think gnuplot (beta version?) can already do some of that. I
 > wonder what its authors would say to a little - um -
 > cross-fertilization?

I looked at gnuplot, but it has restrictions like not handling NAs.
It is also not written in a very modular fashion so it would be
relatively hard to just extract just the necessary algroithms.

contour (the most difficult) is already done and in the latest release
- although I am still looking at methods for labelling the contours.
Persp is pretty easy and image is essentially trivial.  It all really
just comes down to having the time to do the job.

You could write an interpreted persp as follows.  Run all the facets
through a perspective transformation and then sort by depth.  Start
at the back and draw each facet by filling with a solid color to
erase whatever's behind and then draw the boundary.  Axes are rather

At present I'm pretending to be a real statistician and am doing some
demand forecasting for the local airline so they can make decisions on
aircraft leasing.  There's some serious $$ at stake so that gets
r-testers mailing list -- To (un)subscribe, send
subscribe	or	unsubscribe
(in the "body", not the subject !)  To: