| ||

SharpPlot Tutorials General Tutorials Chart Samples Style Examples SharpLeaf Tutorials Document Layout Tutorials Text Flow Tutorials Table Tutorials Visual Glossaries SharpPlot Class SharpPlot Methods 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 Release Notes Licensing |
SharpPlot Reference > SharpPlot Properties > EquationFormat Property ## SharpPlot.EquationFormat PropertySet Equation formatter. public string EquationFormat {get; set;} ## Examplesp.EquationFormat = "Time = C0 + C1speed"; ## Simple RegressionThe template is scanned for the strings C0,C1,C2 and so on, depending on the order of fit used. In the example, if the intercept was 2.3 and the slope was 0.42 the equation would read “Time = 2.3 + 0.42speed”. The “+” symbol in the template is a placeholder for the sign, so a negative slope would give a “-” sign here. If a coefficient is zero, the matching term is omitted completely, so the above template could read “Time = 0.5speed” if the line went exactly through the origin. You can use the special placeholder CC for correlation coefficient, and R2 for squared correlation coefficient, for example: sp.EquationFormat = "Time = C0 + C1speed\nCorrelation = R2"; The formatted equation may be written on the fitted line, positioned according to the equation style, or recovered after the line has been drawn by referencing the “Equation” property. This may then be used as part of a note, or placed in the key text. ## Multiple RegressionNote that for multiple regressions (Cloud charts and Scatterplots with the ‘contour’ option) the coefficients are generated in the order Int,x1,x2,...,y1,y2,...,y4 depending on the order of fit chosen for x and y. Set the EquationStyle to ‘forceOrigin’ to cut out the constant term and force the fit through the origin. In this case, the only way to display the equation is by referencing the ‘equation’ property and using this in a note or as part of the key. ## Equation FontEquation uses the NoteFont ## See also ...Formatting text with simple HTML tags | SharpPlot Members | SharpPlot.Equation Property (ReadOnly) | SharpPlot.EquationStyle Property |