TGraphElem
.Visible
This specifies if the element is shown in the graphing area.
TGraphElem
.ShowInLegend
Indicates if the element is shown in the legend.
TGraphElem
.LegendText
This is the text string shown in the legend.
TGraphElem
.Parent
This is a read only attribute indicating the parent element when the object is in the function list.
TGraphElem
.PluginData
PluginData is a dictionary like object where a plugin can store data local to an element. The data is stored in the .grf file. Graph itself does not use this, it is only for use by plugins Every plugin should use a unique value as key in the PluginData dictionary. The value assigned should be a tuple, which may contain anything that can be passed to xmlrpc, e.g. tuples, lists, strings, numbers.
TGraphElem
.ChildList
This is a list of child elements as shown in the function list.
TGraphElem
.Clone()
This creates a new copy of the object.
TBaseFuncType
.sList
This is a list of data points used to plot the function. Each entry is a tuple with 3 elements, the independent variable, x-coordinate and y-coordinate.
TBaseFuncType
.Points
This is a list of pixel coordinates used to plot the function.
TBaseFuncType
.PointNum
This is a list of values indicating the number of continues points in each segment.
TBaseFuncType
.Color
This specifies the color of the function.
TBaseFuncType
.Size
This specifies the width of the function in pixels on the screen.
TBaseFuncType
.Style
This specifies the line style of the function.
TBaseFuncType
.From, TBaseFuncType
.To
From and To specifies the the range of the function.
Standard functions may use float("-inf")
and float("inf")
for an infinite range.
TBaseFuncType
.StartPointStyle, TBaseFuncType
.EndPointStyleThese indicates the style of the end points. Use 0 if you don't want an endpoint.
TBaseFuncType
.DrawType
This indicates how the functions is plotted.
Valid values are Graph.dtAuto
, Graph.dtDots
and Graph.dtLines
.
TBaseFuncType
.MakeDifFunc()
This method will create and return the first derivative of the function.
TBaseFuncType
.Eval(t
)
This evaluates the function at the specified independent variable t
.
The result is a tuple if the (x,y) coordinate pair.
TBaseFuncType
.CalcArea(From, To
)
Calculates the signed area over the range between From
and To
by numeric integration.
The calculated area is between the function and the x-axis for standard and parametric functions,
while it is the area between the function and the center for polar functions.
Graph
.TTan()
Creates a new tangent or normal. It must be attached to a function to be plotted.
TTan
.Valid
This property is True if the tangent is valid, i.e. the function has a first derivative at t.
TTan
.t
This is the value where the tangent/normal interacts with the its parent function.
TTan
.TangentType
This indicates if the object is a tangent or normal.
Valid values are Graph.ttTangent
and Graph.ttNormal
.
Graph
.TPointSeries()
Creates a new point series.
TPointSeries
.FillColor, TPointSeries
.FrameColor, TPointSeries
.Size, TPointSeries
.StyleThese properties sets the color filling the markers, the border color of the markers and the style of the markers.
TPointSeries
.LineColor, TPointSeries
.LineSize, TPointSeries
.LineStyleThese properties sets the color, size and style of the line between the markers.
TPointSeries
.xErrorBarType, TPointSeries
.yErrorBarType
These specifies the type of vertical and horizontal error bars.
Valid values are Graph.ebtNone
for no error bars, Graph.ebtFixed
for fixed size error bars,
Graph.ebtRelative
for error bars being a percentage of the coordinate value,
and Graph.ebtCustom
for a custom specified error bar for every point.
TPointSeries
.xErrorValues, TPointSeries
.yErrorValues
These contains the value used for the error bars when xErrorBarType or yErrorBarType is
Graph.ebtFixed
or Graph.ebtRelative
.
TPointSeries
.Interpolation
This specifies the interpolation algorithm used for drawing lines between the markers.
Valid values are Graph.iaLinear
, Graph.iaCubicSpline
,
Graph.iaHalfCosine
and Graph.iaCubicSpline2
.
TPointSeries
.ShowLabels
Set this to True to show coordinate labels next to the markers.
TPointSeries
.Font
This sets the font used when drawing the coordinate labels.
TPointSeries
.LabelPosition
This specifies where the coordinate labels are placed relative to the markers.
Valid values are Graph.lpAbove
, Graph.lpBelow
, Graph.lpLeft
,
Graph.lpRight
, Graph.lpAboveLeft
, Graph.lpAboveRight
,
Graph.lpBelowLeft
and Graph.lpBelowRight
.
TPointSeries
.PointType
This specifies if the coordinates in Points are in polar or cartesian coordinates.
Valid values are Graph.ptCartesian
and Graph.ptPolar
.
TPointSeries
.Points
This is a list of tuples with (x,y) coordinates for the points.
TPointSeries
.PointData
This is a list with a tuple with 4 elements for each point.
The tuple contains the first coordinate, second coordinate, x-error and y-error, all in text form.
The first and second coordinates are (x,y) coordinates if PointType is Graph.ptCartesian
,
and (θ,r) coordinates if PointType is Graph.ptpolar
.
Graph
.TTextLabel()
Creates a new text label object.
TTextLabel
.Text
This is the text in the label in Rich Text format.
TTextLabel
.BackgroundColor
This is the background color of the label. Use 0x1fffffff for transparent.
TTextLabel
.Placement
This specifies the placement of the label.
Valid values are Graph.lpUserTopLeft
, Graph.lpAboveX
, Graph.lpBelowX
,
Graph.lpLeftOfY
, Graph.lpRightOfY
, Graph.lpUserTopRight
,
Graph.lpUserBottomLeft
and Graph.lpUserBottomRight
.
TTextLabel
.Rotation
This specifies the rotation of the label in degrees.
TTextLabel
.xPos, TTextLabel
.yPos
xPos
and yPos
indicates the (x,y) coordinate of the label when Placement is
Graph.lpUserTopLeft
, Graph.lpUserTopRight
, Graph.lpUserBottomLeft
or
Graph.lpUserBottomRight
.
Graph
.TShading()
Creates a new shading object. It must be attached to a function to be plotted.
TShading
.ShadeStyle
This specifies the type of shading.
Valid values are Graph.ssAbove
, Graph.ssBelow
, Graph.ssXAxis
,
Graph.ssYAxis
, Graph.ssBetween
and Graph.ssInside
.
TShading
.BrushStyle
This is a vcl.TBrushStyle
that specifies the brush style used to plot the shading.
TShading
.Color
This specifies the color of the shading.
TShading
.Func2
This must specify the second function when BrushStyle is Graph.ssBetween
.
TShading
.sMin, TShading
.sMaxThis is the start and end values on the function for the shading.
TShading
.sMin2, TShading
.sMax2
When ShadeStyle is Graph.ssBetween
this is the start and end value on Func2 for the shading.
TShading
.ExtendMinToIntercept, TShading
.ExtendMaxToIntercept, TShading
.ExtendMin2ToIntercept, TShading
.ExtendMax2ToInterceptWhen True, sMin and sMin2 are decreased and sMax and sMax2 are increased until the function is crossing the axis, the edge of the graphing area, itself or another graph depending of the value in ShadeStyle.
TShading
.MarkBorder
When True a line will be drawn around the shading.
Graph
.TRelation(Str, [ConstraintStr]
)
Creates a new relation object with the relation specified in Str
and an optional constraint specified in ConstraintStr
.
TRelation
.BrushStyle
This is a vcl.TBrushStyle
that specifies the brush style used to plot inequalities.
TRelation
.Color
This specifies the color of the relation.
TRelation
.RelationType
This read only attribute indicates if the relation is an equation (Graph.rtEquation
) or inequation (Graph.rtInequality
).
TRelation
.Size
This is the width of the plot of the inequation or the width of the borderline around the inequality. Size may be 0 if no borderline is wanted.
TRelation
.Text
This is the text of the equation or inequality.
TRelation
.Constraints
This is the text of the constraints.
TRelation
.Eval(x, y
)
Evaluate the relation at the given x- and y-coordinates and return the result.