| ||
SharpPlot Tutorials General Tutorials Chart Samples Style Examples SharpLeaf Tutorials Document Layout Tutorials Text Flow Tutorials Table Tutorials Visual Glossaries SharpPlot Class SharpPlot Properties SharpPlot Structures SharpPlot Enumerations PageMap Class SharpLeaf Reference SharpLeaf Class SharpLeaf Properties SharpLeaf Methods Table Class Table Properties Table Methods SharpLeaf Structures FontType Structure ParagraphStyle Structure BoxStyle Structure SharpLeaf Enumerations DocumentLayout Classes DocumentLayout Class PageLayout Class PageElement Abstract Class Frame : PageElement Class TextBlock : PageElement Class ImageBlock : PageElement Class Box : PageElement Class Rule : PageElement Class Common Reference Document Class VectorMath Class DbUtil Class Download Release Notes Licensing |
SharpPlot Reference > SharpPlot Methods > DrawContourPlot Method SharpPlot.DrawContourPlot MethodGenerate contour plot from xyz values passed as 3 arrays. Examplesp = new SharpPlot(180,120); sp.SetMargins(6,18,18,4); sp.SetMarkers(Marker.Bullet); sp.ContourPlotStyle = ContourPlotStyles.GridLines|ContourPlotStyles.Curves; sp.SetXTickMarks(50); sp.SetZTickMarks(50); sp.MeshDensity = 5; ydata = new int[] {190,270,310,120,190,230}; xdata = new int[] {17,31,29,14,16,24}; elevation = new int[] {12,65,77,7,9,112}; sp.DrawContourPlot(ydata,xdata,elevation); The short tutorial develops several examples, showing various strategies for contour fitting. Overloads
DescriptionContour plots are often an excellent alternative to 3D presentations where the object is to model three-dimensional data. Obviously, they can be used ‘just like a map’ where you may have a set of spot-heights (z-values) at various locations on the xy-plane. In this case, there is no particular shape assumed for the landscape, and the contours would simply be drawn to give the best ‘smooth interpretation’ of the recorded heights. Another good use of contour plots is to fit some kind of model to the results from any experiment where two factors are systematically altered, and a third one is measured. In this case, the contours represent the model (they will simply be angled lines if the model is linear in both x and y directions) and make it very easy to read off the predicted result for any combination of input variables. Several examples of various types of fitted contours are given in the tutorial. You will almost certainly need to experiment with the Order of fit and Flexibility properties to get the best results for your particular data. See also ...Contour plots for XYZ interpolation | SharpPlot Members | SharpPlot.Flexibility Property | SharpPlot.ScatterPlotStyle Property | SharpPlot.SetOrderOfFit Method |