well I was not sure if you meant a surface plot. but if that is what you mean then you might try this. Note that the values should be evenly spread between the X and Y axis
// worksheet with the data
Worksheet wks("surface");
// create matrixpage to accomodate the data
MatrixPage mp("matrix1");
mp.Create("origin");
MatrixLayer mly = mp.Layers(0);
Matrix matA(mly);
// copy data to matrix
matA.CopyFromWks(wks);
// define X axis values and Y axis values for surface
matA.Xmin = -10;
matA.Xmax = 10;
matA.Ymin = 0;
matA.Ymax =100;
MatrixObject mobj = mly.MatrixObjects();
// create graph
GraphPage gp;
gp.Create("Wirefrm");// important!!
GraphLayer glay = gp.Layers();
// plot surface and indicate that it should be a
// IDM_PLOT_SURFACE_COLORMAP for colormap
// or IDM_PLOT_SURFACE_WIREFRAME for WIREFRAME
//
int nPlot = glay.AddPlot(mobj, IDM_PLOT_SURFACE_COLORMAP);
glay.Rescale();
unfortunately this is not documented well
(or at least I didn't find it yet but with a little common sense and some post from the forum I got the colormap to work)
Edited by - edsger on 03/24/2005 3:22:21 PM