Does anyone have any suggestions on perspective plotting of piecewise constant functions? Ideally, I would like something like plot.stepfun for functions that are piecewise constant on polygons. Even pointers to non-R strategies would be welcome at this stage. url: www.econ.uiuc.edu Roger Koenker Dept. of Economics UCL, email rkoenker at uiuc.edu Department of Economics Drayton House, vox: 217-333-4558 University of Illinois 30 Gordon St, fax: 217-244-6678 Champaign, IL 61820 London,WC1H 0AX, UK
On Fri, 2 May 2003 05:49:30 -0500 (CDT), you wrote:> >Does anyone have any suggestions on perspective plotting of piecewise constant functions? >Ideally, I would like something like plot.stepfun for functions that are piecewise >constant on polygons. Even pointers to non-R strategies would be welcome at this stage.You could use one of the 3D packages. Daniel Adler and I have agreed to merge our efforts, but you can get either one now. Mine is available from <http://www.stats.uwo.ca/faculty/murdoch/software> as djmrgl.zip, his is available at <http://wsopuppenkiste.wiso.uni-goettingen.de/~dadler/rgl>. With mine, you could use a function like persp() after evaluating the function on a grid. You could get a somewhat better looking result by drawing the surface explicitly as triangles or quadrilaterals; that's why my hist3d function does. One disadvantage to both of these packages is that they only produce bitmapped graphics, so the results don't look sharp if printed. The solution is to produce really big bitmaps. Duncan Murdoch