IGLib  1.7.2
The IGLib base library for development of numerical, technical and business applications.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros
IG.Gr.PlotZedgraphCurve Class Reference

Curve plots that is shown on a ZedGraphControl object. More...

+ Inheritance diagram for IG.Gr.PlotZedgraphCurve:
+ Collaboration diagram for IG.Gr.PlotZedgraphCurve:

Public Member Functions

 PlotZedgraphCurve (PlotterZedGraph plotter)
 Creates a curve plot. More...
 
void SetCurveDefiniton (IRealFunction funcX, IRealFunction funcY)
 Sets definition of the parametric curve in 2D to be plotted. More...
 
void SetCurveDefiniton (IRealFunction func)
 Sets explicit definition of curve in 2D to be plotted. More...
 
void ClearCurveDefinition ()
 Removes any eventual definition of the plotted curve curve by functions (either parametric or explicit). More...
 
override void CalculateBoundsCoordinates ()
 Recalculates bounds for coordinates on the graphic objects currently contained in the graph. More...
 
void ClearPoints ()
 Clears the list of points that define the curve to be plotted. More...
 
void AddPoint (double xCoordinate, double yCoordinate)
 Adds a point with specified coordinates to the curve plotted on the current curve graph. More...
 
void AddPoint (vec2 point)
 Adds the specified point to the curve plotted on the current curve graph. More...
 
void AddPoints (params vec2[] points)
 Adds the specified set of points to the curve plotted on the curve graph. More...
 
void SetPoints (params vec2[] points)
 Sets points of the curve plotted on the curve graph. More...
 
void AddPoints (params Vector2d[] points)
 Adds the specified set of points to the curve plotted on the curve graph. More...
 
void SetPoints (params Vector2d[] points)
 Sets points of the curve plotted on the curve graph. More...
 
void AddPoints (params IVector[] points)
 Adds the specified set of points to the curve plotted on the curve graph. More...
 
void SetPoints (params IVector[] points)
 Sets points of the curve plotted on the curve graph. More...
 
void AddPoints (double[] xArray, double[] yArray)
 Adds the specified set of points to the curve plotted on the curve graph. More...
 
void SetPoints (double[] xArray, double[] yArray)
 Sets points of the curve plotted on the curve graph. More...
 
override void CreateData ()
 Creates data for the plot. Basically, this creates and updates the internal data structures used by the plot, while Update will also update the plot in the window where it is shown. More...
 
override void Update ()
 Updates the plot on the plotter (and consequently the related window of type ZedGraphControl). More...
 
override void RemoveFromGraphPane ()
 Removes all items of the current plot from the graph pane. More...
 
- Public Member Functions inherited from IG.Gr.PlotZedGraphBase
 PlotZedGraphBase (PlotterZedGraph plotter)
 Constructor. More...
 
void Dispose ()
 Implementation of IDisposable interface. More...
 

Static Public Member Functions

static SymbolType GetSymbolType (int typeId)
 Converts integer to SymbolType enum. More...
 
static int GetPointType (SymbolType pointType)
 Converts SymbolType enum to integer. More...
 

Public Attributes

bool _linesVisible = DefaultShowLines
 
bool _pointsVisible = DefaultShowPoints
 

Static Public Attributes

static int DefaultNumPoints = 100
 Default number of points when plotting curves specified by functions. More...
 
static double DefaultMinParam = 0
 Default lower bound on parameter. More...
 
static double DefaultMaxParam = 1
 Default upper bound on parameter. More...
 
static bool DefaultShowLines = true
 Default value of the flag specifying whether lines are shown or not. More...
 
static bool DefaultShowPoints = true
 Default value of the flag specifying whether points are shown or not. More...
 
static color DefaultLineColor = Color.Blue
 Default color for curves. More...
 
static double DefaultLineWidth = 2.0
 Default line width. More...
 
static DashStyle DefaultLineDashStyle = DashStyle.Solid
 Default line dash style. More...
 
static StepType DefaultLineStepType = StepType.NonStep
 Default line step type. More...
 
static bool DefaultLineSmoothing = false
 Default smoothing flag. More...
 
static double DefaultLineSmoothness = 1.0
 Default level of smoothing when drawing lines. More...
 
static double DefaultPointSize = 4.0
 Default point size. More...
 
static int DefaultPointType = GetPointType(SymbolType.Circle)
 Default point type. More...
 
static color DefaultPointBorderColor = DefaultLineColor
 Default color for point borders. More...
 
static color DefaultPointFillColor = DefaultLineColor
 Default point fill color. More...
 

Protected Attributes

IRealFunction _functionX
 
int _numPoints = DefaultNumPoints
 
double _minParam = DefaultMinParam
 
double _maxParam = DefaultMaxParam
 
List< vec2_points
 
PointPairList _pointList = null
 
color _lineColor = DefaultLineColor
 
double _lineWidth = DefaultLineWidth
 
DashStyle _lineDashStyle = DefaultLineDashStyle
 
StepType _lineStepType = DefaultLineStepType
 
bool _lineSmoothing = DefaultLineSmoothing
 
double _lineSmoothness = DefaultLineSmoothness
 
double _pointSize = DefaultPointSize
 
int _pointType = DefaultPointType
 
color _pointBorderColor = DefaultPointBorderColor
 
color _pointFillColor = DefaultPointFillColor
 
bool _isX2Axis = false
 
bool _isY2Axis = false
 
LineItem _curveItem
 
- Protected Attributes inherited from IG.Gr.PlotZedGraphBase
bool _autoUpdateBoundsCoordinates = true
 
string _legendString
 

Properties

IRealFunction FunctionX [get, protected set]
 The first component of a 2D function of 1 parameter that acts as parametric definition of the plotted curve. More...
 
IRealFunction FunctionY [get, protected set]
 The second component of a 2D function of 1 parameter that acts as parametric definition of the plotted curve. More...
 
IRealFunction Function [set]
 The first component of a 2D function of 1 parameter that acts as parametric definition of the plotted curve. More...
 
IRealFunction IdentityFunction [get]
 Gets identity function. More...
 
int NumPoints [get, set]
 Number of points in curve plots. Used when plotting curves specified by functions. More...
 
double MinParam [get, set]
 Lower bound on parameter when plotting a curve. More...
 
double MaxParam [get, set]
 Upper bound on parameter when plotting a curve. More...
 
List< vec2Points [get, set]
 List of points that define the curve to be plotted. More...
 
PointPairList PointList [get, set]
 List of points used for ZedGraph representation of the curve. More...
 
bool LinesVisible [get, set]
 Specifies whether lines will be shown for the current curve or not. More...
 
bool PointsVisible [get, set]
 Specifies whether points will be shown for the current curve or not. More...
 
color ColorAll [set]
 Collectively sets the common color for line, point border and point fill. More...
 
color LineColor [get, set]
 Line color. More...
 
double LineWidth [get, set]
 Specifies the line width. More...
 
DashStyle LineDashStyle [get, set]
 Specifies the line dash style. More...
 
StepType LineStepType [get, set]
 Specifies the line step type in form of the Yedgraph's StepType enumerator. If different that StepType.NonStep then horizontal steps are plotted between values. More...
 
bool LineSmoothing [get, set]
 Specifies whether lines are smoothed or not when drawing the curve. More...
 
double LineSmoothness [get, set]
 Specifies the level of smoothing when drawing the curve. More...
 
double PointSize [get, set]
 Type of symbol used for drawing points, specified as int. More...
 
int PointType [get, set]
 Type of symbol used for drawing points, specified as int. More...
 
SymbolType PointTypeSymbol [get, set]
 Type of symbol used for drawing points, specified as SymbolType enum. More...
 
color PointColor [set]
 Collectively sets point border color (PointBorderColor) and point fill color (PointFillColor) to the same value. More...
 
color PointBorderColor [get, set]
 Color for plotting points outline (border). More...
 
color PointFillColor [get, set]
 Points fill color. More...
 
bool IsX2Axis [get, set]
 
bool IsY2Axis [get, set]
 
bool Is2Axis [get, set]
 
LineItem CurveItem [get, protected set]
 LineItem that is put to the GraphPane. Object can be removed from the pane through this property. More...
 
- Properties inherited from IG.Gr.PlotZedGraphBase
object Lock [get]
 This object's central lock object to be used by other object. Do not use this object for locking in class' methods, for this you should use InternalLock. More...
 
int OutputLevel [get, set]
 Level of output to the console for the current object. The defalult output level for newly created object is specified by VtkPlotter.DefaultOutputLevel. More...
 
StopWatch1 Timer [get]
 Stopwatch that can be used to measure the time efficiency of actions. More...
 
color BackGround [get, set]
 Sets background color of the plotter that is used by the current plot object. More...
 
PlotterZedGraph Plotter [get, set]
 Zedgraph plotter that is used for plotting graphs produeced by the current plotting class, on a ZedGraph control. More...
 
GraphPane GraphPane [get]
 Gets the GraphPane of the plotter on which the current line plot is plotted. More...
 
bool AutoUpdateBoundsCoordinates [get, set]
 Determines whether bounds on plotted geometry are automatically updated when new primitives are added. More...
 
BoundingBox2d BoundsCoordinates [get]
 Bounds of the current plot. More...
 
string LegendString [get, set]
 String that is used for the current plot item in the legend. More...
 
- Properties inherited from IG.Lib.ILockable
object Lock [get]
 

Private Attributes

IRealFunction _functionY
 
IRealFunction _identity
 

Additional Inherited Members

- Protected Member Functions inherited from IG.Gr.PlotZedGraphBase
virtual void Dispose (bool disposing)
 Does the job of freeing resources. More...
 

Detailed Description

Curve plots that is shown on a ZedGraphControl object.

Line and point settings can be specified such that look of the curve plotted is finely adjusted.

Symbol to draw points can be specified as SymbolType enum or as integer, which is useful in automatical settings when drawing multiple curves.

$A Igor Jun09 Nov11;

Constructor & Destructor Documentation

IG.Gr.PlotZedgraphCurve.PlotZedgraphCurve ( PlotterZedGraph  plotter)
inline

Creates a curve plot.

Parameters
plotterPlotter used for displaying the plot.

Member Function Documentation

void IG.Gr.PlotZedgraphCurve.SetCurveDefiniton ( IRealFunction  funcX,
IRealFunction  funcY 
)
inline

Sets definition of the parametric curve in 2D to be plotted.

Parameters
funcXFunction of parameter that defines X coordinates of points.
funcYFunction of parameter that defines Y coordinates of points.

Referenced by IG.Gr.PlotterZedGraph.ExampleDecorations(), and IG.Gr.PlotterZedGraph.ExampleLissajous().

void IG.Gr.PlotZedgraphCurve.SetCurveDefiniton ( IRealFunction  func)
inline

Sets explicit definition of curve in 2D to be plotted.

Parameters
funcFunction that defines how Y coordinate depends on X coordinate of points.
void IG.Gr.PlotZedgraphCurve.ClearCurveDefinition ( )
inline

Removes any eventual definition of the plotted curve curve by functions (either parametric or explicit).

override void IG.Gr.PlotZedgraphCurve.CalculateBoundsCoordinates ( )
inlinevirtual

Recalculates bounds for coordinates on the graphic objects currently contained in the graph.

Implements IG.Gr.PlotZedGraphBase.

void IG.Gr.PlotZedgraphCurve.ClearPoints ( )
inline

Clears the list of points that define the curve to be plotted.

void IG.Gr.PlotZedgraphCurve.AddPoint ( double  xCoordinate,
double  yCoordinate 
)
inline

Adds a point with specified coordinates to the curve plotted on the current curve graph.

Parameters
xCoordinateX coordinate of the added point.
yCoordinateY coordinate of the added point.

Referenced by IG.Gr.PlotterZedGraph.ExampleCurveStylesWithSave(), IG.Gr.PlotterZedGraph.ExempleSinePlots(), IG.Forms.VectorFunctionPlotter1d.PlotParametricTest(), and IG.Forms.VectorFunctionPlotter2d.PlotParametricTest1d().

void IG.Gr.PlotZedgraphCurve.AddPoint ( vec2  point)
inline

Adds the specified point to the curve plotted on the current curve graph.

Parameters
pointPoint to be added.
void IG.Gr.PlotZedgraphCurve.AddPoints ( params vec2[]  points)
inline

Adds the specified set of points to the curve plotted on the curve graph.

Parameters
pointsPoints to be added to the curve definition.
void IG.Gr.PlotZedgraphCurve.SetPoints ( params vec2[]  points)
inline

Sets points of the curve plotted on the curve graph.

Parameters
pointsPoints to be added to the curve definition.

If any of the the elements of the array is null then it is ignored.

void IG.Gr.PlotZedgraphCurve.AddPoints ( params Vector2d[]  points)
inline

Adds the specified set of points to the curve plotted on the curve graph.

Parameters
pointsPoints to be added to the curve definition.

If any of the the elements of the array is null then it is ignored.

void IG.Gr.PlotZedgraphCurve.SetPoints ( params Vector2d[]  points)
inline

Sets points of the curve plotted on the curve graph.

Parameters
pointsPoints to be added to the curve definition.

If any of the the elements of the array is null then it is ignored.

void IG.Gr.PlotZedgraphCurve.AddPoints ( params IVector[]  points)
inline

Adds the specified set of points to the curve plotted on the curve graph.

Parameters
pointsPoints to be added to the curve definition.

If any of the the elements of the array is null then it is ignored. Otherwise, vectors representing points must be of dimension 2.

void IG.Gr.PlotZedgraphCurve.SetPoints ( params IVector[]  points)
inline

Sets points of the curve plotted on the curve graph.

Parameters
pointsPoints to be added to the curve definition.

If any of the the elements of the array is null then it is ignored. Otherwise, vectors representing points must be of dimension 2.

void IG.Gr.PlotZedgraphCurve.AddPoints ( double[]  xArray,
double[]  yArray 
)
inline

Adds the specified set of points to the curve plotted on the curve graph.

Parameters
xArrayArray of X coordinates of the points that define the curve.
yArrayArray of Y coordinates of the points that define the curve.
void IG.Gr.PlotZedgraphCurve.SetPoints ( double[]  xArray,
double[]  yArray 
)
inline

Sets points of the curve plotted on the curve graph.

Parameters
xArrayArray of X coordinates of the points that define the curve.
yArrayArray of Y coordinates of the points that define the curve.
static SymbolType IG.Gr.PlotZedgraphCurve.GetSymbolType ( int  typeId)
inlinestatic

Converts integer to SymbolType enum.

Parameters
typeIdInteger to be converted.
static int IG.Gr.PlotZedgraphCurve.GetPointType ( SymbolType  pointType)
inlinestatic

Converts SymbolType enum to integer.

Parameters
typeIdEnumumerator value to be converted.
override void IG.Gr.PlotZedgraphCurve.CreateData ( )
inlinevirtual

Creates data for the plot. Basically, this creates and updates the internal data structures used by the plot, while Update will also update the plot in the window where it is shown.

Implements IG.Gr.PlotZedGraphBase.

override void IG.Gr.PlotZedgraphCurve.Update ( )
inlinevirtual

Updates the plot on the plotter (and consequently the related window of type ZedGraphControl).

Reimplemented from IG.Gr.PlotZedGraphBase.

References IG.Num.vec2.Add(), IG.Num.vec2.x, and IG.Num.vec2.y.

override void IG.Gr.PlotZedgraphCurve.RemoveFromGraphPane ( )
inlinevirtual

Removes all items of the current plot from the graph pane.

Must be overridden in derived classes.

Implements IG.Gr.PlotZedGraphBase.

Member Data Documentation

IRealFunction IG.Gr.PlotZedgraphCurve._functionX
protected
IRealFunction IG.Gr.PlotZedgraphCurve._functionY
private
IRealFunction IG.Gr.PlotZedgraphCurve._identity
private
int IG.Gr.PlotZedgraphCurve.DefaultNumPoints = 100
static

Default number of points when plotting curves specified by functions.

int IG.Gr.PlotZedgraphCurve._numPoints = DefaultNumPoints
protected
double IG.Gr.PlotZedgraphCurve.DefaultMinParam = 0
static

Default lower bound on parameter.

double IG.Gr.PlotZedgraphCurve.DefaultMaxParam = 1
static

Default upper bound on parameter.

double IG.Gr.PlotZedgraphCurve._minParam = DefaultMinParam
protected
double IG.Gr.PlotZedgraphCurve._maxParam = DefaultMaxParam
protected
List<vec2> IG.Gr.PlotZedgraphCurve._points
protected
PointPairList IG.Gr.PlotZedgraphCurve._pointList = null
protected
bool IG.Gr.PlotZedgraphCurve.DefaultShowLines = true
static

Default value of the flag specifying whether lines are shown or not.

bool IG.Gr.PlotZedgraphCurve._linesVisible = DefaultShowLines
bool IG.Gr.PlotZedgraphCurve.DefaultShowPoints = true
static

Default value of the flag specifying whether points are shown or not.

bool IG.Gr.PlotZedgraphCurve._pointsVisible = DefaultShowPoints
color IG.Gr.PlotZedgraphCurve.DefaultLineColor = Color.Blue
static

Default color for curves.

color IG.Gr.PlotZedgraphCurve._lineColor = DefaultLineColor
protected
double IG.Gr.PlotZedgraphCurve.DefaultLineWidth = 2.0
static

Default line width.

double IG.Gr.PlotZedgraphCurve._lineWidth = DefaultLineWidth
protected
DashStyle IG.Gr.PlotZedgraphCurve.DefaultLineDashStyle = DashStyle.Solid
static

Default line dash style.

DashStyle IG.Gr.PlotZedgraphCurve._lineDashStyle = DefaultLineDashStyle
protected
StepType IG.Gr.PlotZedgraphCurve.DefaultLineStepType = StepType.NonStep
static

Default line step type.

StepType IG.Gr.PlotZedgraphCurve._lineStepType = DefaultLineStepType
protected
bool IG.Gr.PlotZedgraphCurve.DefaultLineSmoothing = false
static

Default smoothing flag.

bool IG.Gr.PlotZedgraphCurve._lineSmoothing = DefaultLineSmoothing
protected
double IG.Gr.PlotZedgraphCurve.DefaultLineSmoothness = 1.0
static

Default level of smoothing when drawing lines.

double IG.Gr.PlotZedgraphCurve._lineSmoothness = DefaultLineSmoothness
protected
double IG.Gr.PlotZedgraphCurve.DefaultPointSize = 4.0
static

Default point size.

double IG.Gr.PlotZedgraphCurve._pointSize = DefaultPointSize
protected
int IG.Gr.PlotZedgraphCurve.DefaultPointType = GetPointType(SymbolType.Circle)
static

Default point type.

int IG.Gr.PlotZedgraphCurve._pointType = DefaultPointType
protected
color IG.Gr.PlotZedgraphCurve.DefaultPointBorderColor = DefaultLineColor
static

Default color for point borders.

color IG.Gr.PlotZedgraphCurve._pointBorderColor = DefaultPointBorderColor
protected
color IG.Gr.PlotZedgraphCurve.DefaultPointFillColor = DefaultLineColor
static

Default point fill color.

color IG.Gr.PlotZedgraphCurve._pointFillColor = DefaultPointFillColor
protected
bool IG.Gr.PlotZedgraphCurve._isX2Axis = false
protected
bool IG.Gr.PlotZedgraphCurve._isY2Axis = false
protected
LineItem IG.Gr.PlotZedgraphCurve._curveItem
protected

Property Documentation

IRealFunction IG.Gr.PlotZedgraphCurve.FunctionX
getprotected set

The first component of a 2D function of 1 parameter that acts as parametric definition of the plotted curve.

IRealFunction IG.Gr.PlotZedgraphCurve.FunctionY
getprotected set

The second component of a 2D function of 1 parameter that acts as parametric definition of the plotted curve.

IRealFunction IG.Gr.PlotZedgraphCurve.Function
setprotected

The first component of a 2D function of 1 parameter that acts as parametric definition of the plotted curve.

IRealFunction IG.Gr.PlotZedgraphCurve.IdentityFunction
getprotected

Gets identity function.

int IG.Gr.PlotZedgraphCurve.NumPoints
getset

Number of points in curve plots. Used when plotting curves specified by functions.

Referenced by IG.Gr.PlotterZedGraph.ExampleDecorations(), and IG.Gr.PlotterZedGraph.ExampleLissajous().

double IG.Gr.PlotZedgraphCurve.MinParam
getset

Lower bound on parameter when plotting a curve.

Referenced by IG.Gr.PlotterZedGraph.ExampleDecorations(), and IG.Gr.PlotterZedGraph.ExampleLissajous().

double IG.Gr.PlotZedgraphCurve.MaxParam
getset

Upper bound on parameter when plotting a curve.

Referenced by IG.Gr.PlotterZedGraph.ExampleDecorations(), and IG.Gr.PlotterZedGraph.ExampleLissajous().

List<vec2> IG.Gr.PlotZedgraphCurve.Points
getsetprotected

List of points that define the curve to be plotted.

PointPairList IG.Gr.PlotZedgraphCurve.PointList
getsetprotected

List of points used for ZedGraph representation of the curve.

bool IG.Gr.PlotZedgraphCurve.LinesVisible
getset

Specifies whether lines will be shown for the current curve or not.

color IG.Gr.PlotZedgraphCurve.ColorAll
set

Collectively sets the common color for line, point border and point fill.

DashStyle IG.Gr.PlotZedgraphCurve.LineDashStyle
getset

Specifies the line dash style.

Referenced by IG.Gr.PlotterZedGraph.ExampleCurveStylesWithSave().

StepType IG.Gr.PlotZedgraphCurve.LineStepType
getset

Specifies the line step type in form of the Yedgraph's StepType enumerator. If different that StepType.NonStep then horizontal steps are plotted between values.

Referenced by IG.Gr.PlotterZedGraph.ExampleCurveStylesWithSave().

bool IG.Gr.PlotZedgraphCurve.LineSmoothing
getset

Specifies whether lines are smoothed or not when drawing the curve.

Referenced by IG.Gr.PlotterZedGraph.ExampleCurveStylesWithSave(), IG.Gr.PlotterZedGraph.ExampleDecorations(), and IG.Gr.PlotterZedGraph.ExampleLissajous().

double IG.Gr.PlotZedgraphCurve.LineSmoothness
getset

Specifies the level of smoothing when drawing the curve.

Must be between 0 (not smoothed) and 1 (fully smoothed).

When set to a value greater than 0, the LineSmoothing flag is set to true.

double IG.Gr.PlotZedgraphCurve.PointSize
getset

Type of symbol used for drawing points, specified as int.

Referenced by IG.Gr.PlotterZedGraph.ExampleCurveStylesWithSave().

int IG.Gr.PlotZedgraphCurve.PointType
getset

Type of symbol used for drawing points, specified as int.

SymbolType IG.Gr.PlotZedgraphCurve.PointTypeSymbol
getset

Type of symbol used for drawing points, specified as SymbolType enum.

Referenced by IG.Gr.PlotterZedGraph.ExampleCurveStylesWithSave().

color IG.Gr.PlotZedgraphCurve.PointColor
set

Collectively sets point border color (PointBorderColor) and point fill color (PointFillColor) to the same value.

bool IG.Gr.PlotZedgraphCurve.IsX2Axis
getset
bool IG.Gr.PlotZedgraphCurve.IsY2Axis
getset
bool IG.Gr.PlotZedgraphCurve.Is2Axis
getset
LineItem IG.Gr.PlotZedgraphCurve.CurveItem
getprotected set

LineItem that is put to the GraphPane. Object can be removed from the pane through this property.


The documentation for this class was generated from the following file: