Home > Sample Charts > ResponsePlot > Mesh with Given X and Y Co-ordinates

Mesh with Given X and Y Co-ordinates

This chart is almost always used to illustrate a computed mathematical surface, and could often be combined with a Cloudchart to show a theoretical model overlayed with raw data values.

In the simplest case it takes a rectangular array of arrays of Z-values (effectively a matrix) and treats these as a uniform mesh to be plotted vertically with equally spaced x and y values. An option is to provide either or both of the x and x values as arrays of the correct length, to draw the mesh on a non-uniform scale.

This has the same arrays for the mesh as shown in the first example, but the nodes are placed explicitly in both X and Y directions, so the effect is to stretch the surface.


SharpPlot sp = new SharpPlot;
mesh = new int[][]{new int[]{8,7,6,5,4,3},new int[]{12,11,10,9,8,7},new int[]{16,15,
         14,13,12,11}};
xvalues = new int[] {8,10,16,20,26,48};
yvalues = new int[] {8,12,20};

sp.SetMargins(48,12,24,0);
sp.Heading = "Stretched Mesh Surface";
sp.ResponsePlotStyle = ResponsePlotStyles.WallShading|ResponsePlotStyles.Markers;
sp.SetMarkers(Marker.Ball);

sp.DrawResponsePlot(mesh,xvalues,yvalues);

Worked Examples

responseplot1 responseplot2 responseplot3 responseplot4

Send comments on this topic
© Dyalog Ltd 2013