/* Plots a mesh representation of the function z[x][y]. The x values */
/* are stored as x[0..nx-1], the y values as y[0..ny-1], and the */
/* z values are in the 2-d array z[][0..ly-1]. The integer "opt" */
/* specifies: */
/*  opt = 1:  Draw lines parallel to x-axis */
/*  opt = 2:  Draw lines parallel to y-axis */
/*  opt = 3:  Draw lines parallel to both axes */

#include "plplot.h"
#ifdef PLSTDC
#include <stdlib.h>
#else
extern void free();
#endif

extern PLINT pl3mode;
extern PLINT *oldloview;

void plmesh(x,y,z,ly,nx,ny,opt)
PLINT ly, nx, ny, opt;
PLFLT *x, *y, *z;
{
   pl3mode = 1;
   plot3d(x,y,z,ly,nx,ny,opt,0);

   free((VOID *)oldloview);
   pl3mode = 0;
}
