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.PlotterZedGraph Class Reference

Plotter class that uses a ZedGraphControl object for plotting ordinary 2D graphs. More...

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

Classes

class  ExampleSineFunctionForLissajous
 Sine function with the specified frequency factor and phase. Used in the ExampleLissajous. More...
 

Public Member Functions

 PlotterZedGraph (ZedGraphControl plotWindow)
 
bool ContainsPlotObject (PlotZedGraphBase plotObject)
 Returns true if the specified plotting object is contained on (registered with) the current PlotterZedGraph object, or false otherwise. More...
 
void AddPlotObject (PlotZedGraphBase plotObject)
 Adds the specified plotting object to the list of plotting objects of the current plotter. More...
 
void AddPlotObjects (params PlotZedGraphBase[] plotObjects)
 Adds the specified plotting objects to the list of plotting objects of the current plotter. More...
 
void RemoveAllPlotObjects ()
 Removes all plotting objects from the list of plotting objects of the current polotter. More...
 
void RemovePlotObject (PlotZedGraphBase plotObject)
 Removes the specified plotting object from the list of plotting objects of the current plotter, and disposes unmanaged resources used by that object. More...
 
void RemovePlotObjects (params PlotZedGraphBase[] plotObjects)
 Removes the specified plotting objects from the list of plotting objects of the current plotter, and disposes unmanaged resources used by that objects. More...
 
void SetBounds (double minX, double maxX, double minY, double maxY)
 Sets graph bounds to the specified values. More...
 
void SetBounds (IBoundingBox bounds)
 Sets graph bounds to the specified values. More...
 
void SetBounds2 (double minX, double maxX, double minY, double maxY)
 Sets graph bounds for the second axes to the specified values. More...
 
void SetBounds2 (IBoundingBox bounds)
 Sets graph bounds for the second axes to the specified values. More...
 
void Update ()
 Updates the current plotter's settings such that they are reflected on the graph. More...
 
void ResetView ()
 Resets the view (scale and position of the graph) in such a way that all plotted objects are visible. More...
 
void Dispose ()
 Implementation of IDisposable interface. More...
 

Static Public Member Functions

static ZedGraphWindow CreateWindow ()
 Creates a top-level window including a ZedGraph control (type ZedGraphControl) and returns it such that the ZedGraph control can be accessed and window opened. More...
 
static PlotterZedGraph CreateDefault (ZedGraphControl window)
 
static void ExampleDecorations ()
 Example that demonstrates how decorations (titles, labels, scales, etc.) can be sadjusted.. More...
 
static void ExampleCurveStylesWithSave (string filePath)
 Tests plotting with ZedGraph. If file path is specified then graph contents is saved to the specified file. More...
 
static void ExampleLissajous ()
 Plots a specific Lissayous curve. More...
 
static void ExampleLissajous (int a, int b)
 Plots a Lissayous curve with the specified integer ratios of frequencies and phase difference zero. More...
 
static void ExempleSinePlots ()
 Plots a set of sine surves with different (equally spaced) phases, in different colors on the same graph. More...
 
static void ExempleSinePlots (int numCurves, int numPoints)
 Plots a set of sine surves with different (equally spaced) phases, in different colors on the same graph. More...
 

Public Attributes

int DefaultPointValuePrecision = 4
 Default precision for point values displayed in tooltips. More...
 

Static Public Attributes

static color DefaultBackgroundColor1 = new color(1, 1, 1)
 Default first background color for new windows. More...
 
static color DefaultBackgroundColor2 = new color(1, 1, 1)
 Default second background color for new windows. More...
 
static double DefaultBackgroundGradientAngle = 45.0
 Default angle of the background color gradient. More...
 
static bool DefaultIsShowPointValues = true
 Default flag for showing point coordinates in tooltips. More...
 
static string DefaultTitle = "Dependency"
 Default graph title used for new plotter objects when not specified explicitly. More...
 
static FontSpec DefaultTitleFont
 Default font for graph title. More...
 
static FontSpec DefaultAxisLabelFont
 Default font for axis labels. More...
 
static FontSpec DefaultAxisScaleFont
 
static bool DefaultScaleIsVisible = true
 Whether scale is visible by default. More...
 
static bool DefaultAxes2IsVisible = false
 Whether the second axes are visible by default. More...
 
static bool DefaultScale2IsVisible = false
 Whether scale on the second axes is visible by default. More...
 
static bool DefaultZeroLine = true
 Default value of the flag specifying whether zero lines are shown. More...
 
static bool DefaultMajorGridIsVisible = true
 Default value of the flag indicating whether major grid lines are shown. More...
 
static bool DefaultMinorGridIsVisible = false
 Default value of the flag indicating whether minor grid lines are shown. More...
 
static bool DefaultMajorGrid2IsVisible = true
 Default value of the flag indicating whether major grid lines for the second axes are shown. More...
 
static bool DefaultMinorGrid2IsVisible = false
 Default value of the flag indicating whether minor grid lines for the second axes are shown. More...
 
static string DefaultXAxisLabel = "X"
 Default label to for X axis for new plot objects. More...
 
static string DefaultYAxisLabel = "Y"
 Default label for Y axis for new plot objects. More...
 
static string DefaultX2AxisLabel = "X2"
 Default label to for the second X axis for new plot objects. More...
 
static string DefaultY2AxisLabel = "Y2"
 Default label for the second Y axis for new plot objects. More...
 

Protected Member Functions

void CalculateBoundsCoordinates ()
 Recalculates bounds for coordinates on the graphic objects currently contained in the graph. More...
 
virtual void Dispose (bool disposing)
 Does the job of freeing resources. More...
 

Protected Attributes

List< PlotZedGraphBase_plotObjects
 
bool _isShowPointValues = DefaultIsShowPointValues
 
int _pointValuesPrecision = 4
 
string _title = DefaultTitle
 
FontSpec _titleFont
 
string _xAxisLabel = DefaultXAxisLabel
 
FontSpec _xAxisLabelFont
 
bool _xAxisIsZeroLine = DefaultZeroLine
 
FontSpec _xAxisScaleFont
 
bool _xAxisMajorTicAccessed = false
 
bool _xAxisMinorTicAccessed = false
 
string _yAxisLabel = DefaultYAxisLabel
 
FontSpec _yAxisLabelFont
 
bool _yAxisIsZeroLine = DefaultZeroLine
 
FontSpec _yAxisScaleFont
 
bool _yAxisMajorTicAccessed = false
 
bool _yAxisMinorTicAccessed = false
 
string _x2AxisLabel = DefaultX2AxisLabel
 
FontSpec _x2AxisLabelFont
 
bool _x2AxisIsZeroLine = false
 
FontSpec _x2AxisScaleFont
 
bool _x2AxisMajorTicAccessed = false
 
bool _x2AxisMinorTicAccessed = false
 
string _y2AxisLabel = DefaultY2AxisLabel
 
FontSpec _y2AxisLabelFont
 
bool _y2AxisIsZeroLine = false
 
FontSpec _y2AxisScaleFont
 
bool _y2AxisMajorTicAccessed = false
 
bool _y2AxisMinorTicAccessed = false
 

Static Protected Attributes

static int _defaultOutputLevel = -1
 

Properties

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 WindowWidth [get, set]
 Gets/sets width of the top level control containing the ZedGraph control. More...
 
int WindowHeight [get, set]
 Gets/sets height of the top level control containing the ZedGraph control. More...
 
ZedGraphControl Window [get, set]
 Zedgraph control used for plotting graphs. Warning: settes should only be used in constructors. More...
 
GraphPane GraphPane [get, protected set]
 Gets a reference to the GraphPane instance in the current ZedGraphControl. More...
 
BoundingBox2d BoundsCoordinates [get]
 Bounds of the current plot. More...
 
List< PlotZedGraphBasePlotObjects [get, set]
 List of plotting objects contained on the current class. More...
 
static int DefaultOutputLevel [get, set]
 Gets or sets the default level of output for this class. More...
 
int OutputLevel [get, set]
 Level of output to the console for the current object. More...
 
color Background [get, set]
 Background color for the current plotter. More...
 
color Background1 [get, set]
 The first background color of possibly two colors that define color gradient of the plotter window's background. More...
 
color Background2 [get, set]
 The second background color of possibly two colors that define color gradient of the plotter window's background. More...
 
double BackgroundGradientAngle [get, set]
 Angle of the background color gradient. More...
 
bool ShowPlotTip [get, set]
 
bool IsShowPointValues [get, set]
 Whether a tooltip with point coordinates is displayed when a mouse hovers over points. More...
 
int PointValuePrecision [get, set]
 Precision of point values that are displayed in tooltips. More...
 
virtual string Title [get, set]
 Graph title. More...
 
virtual FontSpec TitleFont [get, set]
 Font used for graph title. More...
 
bool XAxisIsVisible [get, set]
 Whether X axis is visible. More...
 
virtual XAxis XAxis [get]
 Gets the X axis of the graph. More...
 
string XAxisLabel [get, set]
 Label for X axis. More...
 
virtual FontSpec XAxisLabelFont [get, set]
 Font used for X axis label. More...
 
bool XAxisIsZeroLine [get, set]
 Whether zero line on X axis is plotted or not. More...
 
bool XAxisScaleIsVisible [get, set]
 Whether scale is shown for X axis. More...
 
Scale XAxisScale [get]
 Scale for X axis. More...
 
FontSpec XAxisScaleFont [get, set]
 Settings for font on X scale. More...
 
MajorTic XAxisMajorTic [get]
 Properties for major tixs on X axis. More...
 
MinorTic XAxisMinorTic [get]
 Properties for minor tixs on X axis. More...
 
bool XAxisMajorGridIsVisible [get, set]
 Whether major grid lines for X axis are shown. More...
 
MajorGrid XAxisMajorGrid [get]
 Major grid lines properties for X axis. More...
 
bool XAxisMinorGridIsVisible [get, set]
 Whether minor grid lines for X axis are shown. More...
 
MinorGrid XAxisMinorGrid [get]
 Minor grid lines properties for X axis. More...
 
bool YAxisIsVisible [get, set]
 Whether Y axis is visible. More...
 
virtual YAxis YAxis [get]
 Gets the Y axis of the graph. More...
 
string YAxisLabel [get, set]
 Label for Y axis. More...
 
virtual FontSpec YAxisLabelFont [get, set]
 Font used for Y axis label. More...
 
bool YAxisIsZeroLine [get, set]
 Whether zero line on Y axis is plotted or not. More...
 
bool YAxisScaleIsVisible [get, set]
 Whether scale is shown for Y axis. More...
 
Scale YAxisScale [get]
 Scale for Y axis. More...
 
FontSpec YAxisScaleFont [get, set]
 Settings for font on Y scale. More...
 
MajorTic YAxisMajorTic [get]
 Properties for major tixs on Y axis. More...
 
MinorTic YAxisMinorTic [get]
 Properties for minor tixs on X axis. More...
 
bool YAxisMajorGridIsVisible [get, set]
 Whether major grid lines for Y axis are shown. More...
 
MajorGrid YAxisMajorGrid [get]
 Major grid lines properties for Y axis. More...
 
bool YAxisMinorGridIsVisible [get, set]
 Whether minor grid lines for Y axis are shown. More...
 
MinorGrid YAxisMinorGrid [get]
 Minor grid lines properties for Y axis. More...
 
bool X2AxisIsVisible [get, set]
 Whether X2 axis is visible. More...
 
virtual X2Axis X2Axis [get]
 Gets the X2 axis of the graph. More...
 
string X2AxisLabel [get, set]
 Label for the second X axis. More...
 
virtual FontSpec X2AxisLabelFont [get, set]
 Font used for the second X axis label. More...
 
bool X2AxisIsZeroLine [get, set]
 Whether zero line on X2 axis is plotted or not. More...
 
bool X2AxisScaleIsVisible [get, set]
 Whether scale is shown for X axis. More...
 
Scale X2AxisScale [get]
 Scale for X axis. More...
 
FontSpec X2AxisScaleFont [get, set]
 Settings for font on X scale. More...
 
MajorTic X2AxisMajorTic [get]
 Properties for major tixs on X2 axis. More...
 
MinorTic X2AxisMinorTic [get]
 Properties for minor tixs on X2 axis. More...
 
bool X2AxisMajorGridIsVisible [get, set]
 Whether major grid lines for X2 axis are shown. More...
 
MajorGrid X2AxisMajorGrid [get]
 Major grid lines properties for X2 axis. More...
 
bool X2AxisMinorGridIsVisible [get, set]
 Whether minor grid lines for X2 axis are shown. More...
 
MinorGrid X2AxisMinorGrid [get]
 Minor grid lines properties for X2 axis. More...
 
bool Y2AxisIsVisible [get, set]
 Whether Y2 axis is visible. More...
 
virtual Y2Axis Y2Axis [get]
 Gets the Y2 axis of the graph. More...
 
string Y2AxisLabel [get, set]
 Label for the second Y axis. More...
 
virtual FontSpec Y2AxisLabelFont [get, set]
 Font used for the second Y axis label. More...
 
bool Y2AxisIsZeroLine [get, set]
 Whether zero line on Y2 axis is plotted or not. More...
 
bool Y2AxisScaleIsVisible [get, set]
 Whether scale is shown for Y2 axis. More...
 
Scale Y2AxisScale [get]
 Scale for Y2 axis. More...
 
FontSpec Y2AxisScaleFont [get, set]
 Settings for font on Y2 scale. More...
 
MajorTic Y2AxisMajorTic [get]
 Properties for major tixs on Y2 axis. More...
 
MinorTic Y2AxisMinorTic [get]
 Properties for minor tixs on Y2 axis. More...
 
bool Y2AxisMajorGridIsVisible [get, set]
 Whether major grid lines for Y2 axis are shown. More...
 
MajorGrid Y2AxisMajorGrid [get]
 Major grid lines properties for Y2 axis. More...
 
bool Y2AxisMinorGridIsVisible [get, set]
 Whether minor grid lines for Y2 axis are shown. More...
 
MinorGrid Y2AxisMinorGrid [get]
 Minor grid lines properties for Y2 axis. More...
 
- Properties inherited from IG.Lib.ILockable
object Lock [get]
 

Private Member Functions

 PlotterZedGraph ()
 
string MyPointValueHandler (ZedGraphControl control, GraphPane pane, CurveItem curve, int iPt)
 Displays customized tooltips when the mouse hovers over a point (event handler). More...
 
 ~PlotterZedGraph ()
 

Private Attributes

object _mainLock = new object()
 
ZedGraphControl _window
 
GraphPane _pane
 
BoundingBox2d _boundsCoordinates
 
int _outputLevel = DefaultOutputLevel
 
color _background1 = DefaultBackgroundColor1
 
color _background2 = DefaultBackgroundColor2
 
double _backgroundGradientAngle = DefaultBackgroundGradientAngle
 
bool _showPlotTip = false
 
bool _xAxisIsVisible = true
 
bool _xAxisScaleIsVisible = DefaultScaleIsVisible
 
bool _xAxisMajorGridIsVisible = DefaultMajorGridIsVisible
 
bool _xAxisMinorGridIsVisible = DefaultMinorGridIsVisible
 
bool _yAxisIsVisible = true
 
bool _yAxisScaleIsVisible = DefaultScaleIsVisible
 
bool _yAxisMajorGridIsVisible = DefaultMajorGridIsVisible
 
bool _yAxisMinorGridIsVisible = DefaultMinorGridIsVisible
 
bool _x2AxisIsVisible = DefaultAxes2IsVisible
 
bool _x2AxisScaleIsVisible = DefaultScale2IsVisible
 
bool _x2AxisMajorGridIsVisible = DefaultMajorGrid2IsVisible
 
bool _x2AxisMinorGridIsVisible = DefaultMinorGrid2IsVisible
 
bool _y2AxisIsVisible = DefaultAxes2IsVisible
 
bool _y2AxisScaleIsVisible = DefaultScale2IsVisible
 
bool _y2AxisMajorGridIsVisible = DefaultMajorGrid2IsVisible
 
bool _y2AxisMinorGridIsVisible = DefaultMinorGrid2IsVisible
 
bool disposed = false
 

Detailed Description

Plotter class that uses a ZedGraphControl object for plotting ordinary 2D graphs.

$A Igor Jun09;

Constructor & Destructor Documentation

IG.Gr.PlotterZedGraph.PlotterZedGraph ( )
inlineprivate
IG.Gr.PlotterZedGraph.PlotterZedGraph ( ZedGraphControl  plotWindow)
inline
IG.Gr.PlotterZedGraph.~PlotterZedGraph ( )
inlineprivate

Member Function Documentation

void IG.Gr.PlotterZedGraph.CalculateBoundsCoordinates ( )
inlineprotected

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

This recalculates, if necessary, the bounds of plots that are added on the current plotter (list PlotObjects).

References IG.Gr.PlotZedGraphBase.AutoUpdateBoundsCoordinates, IG.Gr.PlotZedGraphBase.BoundsCoordinates, and IG.Gr.PlotZedGraphBase.CalculateBoundsCoordinates().

bool IG.Gr.PlotterZedGraph.ContainsPlotObject ( PlotZedGraphBase  plotObject)
inline

Returns true if the specified plotting object is contained on (registered with) the current PlotterZedGraph object, or false otherwise.

Parameters
plotObjectPlotting object to be checked.
void IG.Gr.PlotterZedGraph.AddPlotObject ( PlotZedGraphBase  plotObject)
inline

Adds the specified plotting object to the list of plotting objects of the current plotter.

If the object is already on the list of plotting objects then it is not inserted again.

Parameters
plotObjectZedgraph plotting object to be added on the currrent PlotterZedGraph object.

Referenced by IG.Gr.PlotZedGraphBase.PlotZedGraphBase().

void IG.Gr.PlotterZedGraph.AddPlotObjects ( params PlotZedGraphBase[]  plotObjects)
inline

Adds the specified plotting objects to the list of plotting objects of the current plotter.

Parameters
plotObjectsObjects to be added to the list.
void IG.Gr.PlotterZedGraph.RemoveAllPlotObjects ( )
inline

Removes all plotting objects from the list of plotting objects of the current polotter.

void IG.Gr.PlotterZedGraph.RemovePlotObject ( PlotZedGraphBase  plotObject)
inline

Removes the specified plotting object from the list of plotting objects of the current plotter, and disposes unmanaged resources used by that object.

If the specified object is not on the list of plotting objects then nothing happens.

Parameters
plotObjectZedgraph plotting object to be removed from the currrent PlotterZedGraph object.

References IG.Gr.PlotZedGraphBase.Dispose(), and IG.Gr.PlotZedGraphBase.RemoveFromGraphPane().

void IG.Gr.PlotterZedGraph.RemovePlotObjects ( params PlotZedGraphBase[]  plotObjects)
inline

Removes the specified plotting objects from the list of plotting objects of the current plotter, and disposes unmanaged resources used by that objects.

If no objects are specified then nothing happens. Also for the specified objects that are null or are not on the list, nothing happens. If removing one of the objects throws an exception then the remaining objects are removed without any disturbance.

Parameters
plotObjectsObjects to be removed from the list.
void IG.Gr.PlotterZedGraph.SetBounds ( double  minX,
double  maxX,
double  minY,
double  maxY 
)
inline

Sets graph bounds to the specified values.

Parameters
minXLower bound in X coordinate.
maxXUpper bound in X coordinate.
minYLower bound in Y coordinate.
maxYUpper bound in Y coordinate.
void IG.Gr.PlotterZedGraph.SetBounds ( IBoundingBox  bounds)
inline

Sets graph bounds to the specified values.

Parameters
boundsBounds to which graph bounds are specified. Must be different than null and of dimension 2.

References IG.Num.IBoundingBox.Dimension, IG.Num.IBoundingBox.Max, and IG.Num.IBoundingBox.Min.

void IG.Gr.PlotterZedGraph.SetBounds2 ( double  minX,
double  maxX,
double  minY,
double  maxY 
)
inline

Sets graph bounds for the second axes to the specified values.

Parameters
minXLower bound in X coordinate.
maxXUpper bound in X coordinate.
minYLower bound in Y coordinate.
maxYUpper bound in Y coordinate.
void IG.Gr.PlotterZedGraph.SetBounds2 ( IBoundingBox  bounds)
inline

Sets graph bounds for the second axes to the specified values.

Parameters
boundsBounds to which graph bounds are specified. Must be different than null and of dimension 2.

References IG.Num.IBoundingBox.Dimension, IG.Num.IBoundingBox.Max, and IG.Num.IBoundingBox.Min.

void IG.Gr.PlotterZedGraph.Update ( )
inline
void IG.Gr.PlotterZedGraph.ResetView ( )
inline

Resets the view (scale and position of the graph) in such a way that all plotted objects are visible.

string IG.Gr.PlotterZedGraph.MyPointValueHandler ( ZedGraphControl  control,
GraphPane  pane,
CurveItem  curve,
int  iPt 
)
inlineprivate

Displays customized tooltips when the mouse hovers over a point (event handler).

void IG.Gr.PlotterZedGraph.Dispose ( )
inline

Implementation of IDisposable interface.

virtual void IG.Gr.PlotterZedGraph.Dispose ( bool  disposing)
inlineprotectedvirtual

Does the job of freeing resources.

This method can be eventually overridden in derived classes (if they use other resources that must be freed - in addition to such resources of the current class). In the case of overriding this method, you should usually call the base.Dispose(disposing ). in the overriding method.

Parameters
disposingTells whether the method has been called form Dispose() method.
static ZedGraphWindow IG.Gr.PlotterZedGraph.CreateWindow ( )
inlinestatic

Creates a top-level window including a ZedGraph control (type ZedGraphControl) and returns it such that the ZedGraph control can be accessed and window opened.

Returns
A toplevel window containg a ZedGraph control.
static void IG.Gr.PlotterZedGraph.ExampleCurveStylesWithSave ( string  filePath)
inlinestatic

Tests plotting with ZedGraph. If file path is specified then graph contents is saved to the specified file.

Parameters
fileNameName of the file where graph is saved (as a bitmap). If the file already exists then it is not overwritten.

For saving graphics as metafile (i.e. in a vector graphics format), see the below:

Extend Zedgraph to produce SVG: http://stackoverflow.com/questions/2501302/extend-zedgraph-to-produce-svg

ZedGraph C# Graph Data Export to CSV Using a Custom Context Menu: http://www.smallguru.com/2009/06/zedgraph-csharp-graph-data-export-to-cs/

How to save an image as EMF? http://stackoverflow.com/questions/152729/gdi-c-how-to-save-an-image-as-emf

Graphs to clipboard as vector graphics http://forums.ni.com/t5/Measurement-Studio-for-NET/Graphs-to-clipboard-as-vector-graphics/td-p/537105

References IG.Gr.PlotZedgraphCurve.AddPoint(), IG.Gr.PlotterZedGraph.CreateDefault(), IG.Gr.ZedGraphWindow.GraphControl, IG.Gr.PlotZedGraphBase.LegendString, IG.Gr.PlotZedgraphCurve.LineColor, IG.Gr.PlotZedgraphCurve.LineDashStyle, IG.Gr.PlotZedgraphCurve.LineSmoothing, IG.Gr.PlotZedgraphCurve.LineStepType, IG.Gr.PlotZedgraphCurve.LineWidth, IG.Gr.PlotZedgraphCurve.PointBorderColor, IG.Gr.PlotZedgraphCurve.PointFillColor, IG.Gr.PlotZedgraphCurve.PointSize, IG.Gr.PlotZedgraphCurve.PointsVisible, IG.Gr.PlotZedgraphCurve.PointTypeSymbol, IG.Gr.PlotterZedGraph.Update(), IG.Gr.PlotterZedGraph.Window, IG.Gr.PlotterZedGraph.XAxisScale, and IG.Gr.PlotterZedGraph.YAxisScale.

Referenced by IG.Script.ScriptGraphics2dBase.GraphFunctionCurveStylesWithSave().

static void IG.Gr.PlotterZedGraph.ExampleLissajous ( )
inlinestatic

Plots a specific Lissayous curve.

Referenced by IG.Script.ScriptGraphics2dBase.GraphFunctionCurvePlotLissajous().

static void IG.Gr.PlotterZedGraph.ExampleLissajous ( int  a,
int  b 
)
inlinestatic

Plots a Lissayous curve with the specified integer ratios of frequencies and phase difference zero.

Parameters
aFrequency factor for function defining X coordinate.
bFrequency factor for function defining Y coordinate.

References IG.Gr.PlotterZedGraph.CreateDefault(), IG.Gr.ZedGraphWindow.GraphControl, IG.Gr.PlotZedgraphCurve.LineColor, IG.Gr.PlotZedgraphCurve.LineSmoothing, IG.Gr.PlotZedgraphCurve.LineWidth, IG.Gr.PlotZedgraphCurve.MaxParam, IG.Gr.PlotZedgraphCurve.MinParam, IG.Gr.PlotZedgraphCurve.NumPoints, IG.Gr.PlotZedgraphCurve.PointsVisible, IG.Gr.PlotZedgraphCurve.SetCurveDefiniton(), and IG.Gr.PlotterZedGraph.Update().

static void IG.Gr.PlotterZedGraph.ExempleSinePlots ( )
inlinestatic

Plots a set of sine surves with different (equally spaced) phases, in different colors on the same graph.

Referenced by IG.Script.ScriptGraphics2dBase.GraphFunctionSinePlots().

static void IG.Gr.PlotterZedGraph.ExempleSinePlots ( int  numCurves,
int  numPoints 
)
inlinestatic

Plots a set of sine surves with different (equally spaced) phases, in different colors on the same graph.

Parameters
numCurvesNumber of curves to be plotted.
numPointsNumber of points used to plot each curve.

References IG.Gr.PlotZedgraphCurve.AddPoint(), IG.Gr.PlotterZedGraph.CreateDefault(), IG.Lib.ColorScaleBase.CreateRainbow(), IG.Lib.ColorScaleBase.GetColor(), IG.Gr.ZedGraphWindow.GraphControl, IG.Gr.PlotZedGraphBase.LegendString, IG.Gr.PlotZedgraphCurve.LineColor, IG.Gr.PlotZedgraphCurve.PointFillColor, and IG.Gr.PlotterZedGraph.Update().

Member Data Documentation

object IG.Gr.PlotterZedGraph._mainLock = new object()
private
ZedGraphControl IG.Gr.PlotterZedGraph._window
private
GraphPane IG.Gr.PlotterZedGraph._pane
private
BoundingBox2d IG.Gr.PlotterZedGraph._boundsCoordinates
private
List<PlotZedGraphBase> IG.Gr.PlotterZedGraph._plotObjects
protected
int IG.Gr.PlotterZedGraph._defaultOutputLevel = -1
staticprotected
int IG.Gr.PlotterZedGraph._outputLevel = DefaultOutputLevel
private
color IG.Gr.PlotterZedGraph.DefaultBackgroundColor1 = new color(1, 1, 1)
static

Default first background color for new windows.

color IG.Gr.PlotterZedGraph.DefaultBackgroundColor2 = new color(1, 1, 1)
static

Default second background color for new windows.

color IG.Gr.PlotterZedGraph._background1 = DefaultBackgroundColor1
private
color IG.Gr.PlotterZedGraph._background2 = DefaultBackgroundColor2
private
double IG.Gr.PlotterZedGraph.DefaultBackgroundGradientAngle = 45.0
static

Default angle of the background color gradient.

double IG.Gr.PlotterZedGraph._backgroundGradientAngle = DefaultBackgroundGradientAngle
private
bool IG.Gr.PlotterZedGraph._showPlotTip = false
private
bool IG.Gr.PlotterZedGraph.DefaultIsShowPointValues = true
static

Default flag for showing point coordinates in tooltips.

bool IG.Gr.PlotterZedGraph._isShowPointValues = DefaultIsShowPointValues
protected
int IG.Gr.PlotterZedGraph.DefaultPointValuePrecision = 4

Default precision for point values displayed in tooltips.

int IG.Gr.PlotterZedGraph._pointValuesPrecision = 4
protected
string IG.Gr.PlotterZedGraph.DefaultTitle = "Dependency"
static

Default graph title used for new plotter objects when not specified explicitly.

string IG.Gr.PlotterZedGraph._title = DefaultTitle
protected
FontSpec IG.Gr.PlotterZedGraph.DefaultTitleFont
static
Initial value:
= new FontSpec("Times New Roman", 16 ,
Color.Blue, true , true , false )

Default font for graph title.

FontSpec IG.Gr.PlotterZedGraph.DefaultAxisLabelFont
static
Initial value:
= new FontSpec("Courier New", 12 ,
Color.Blue, true , false , false )

Default font for axis labels.

FontSpec IG.Gr.PlotterZedGraph.DefaultAxisScaleFont
static
Initial value:
= new FontSpec("Courier New", 10 ,
Color.Black, false , false , false )
bool IG.Gr.PlotterZedGraph.DefaultScaleIsVisible = true
static

Whether scale is visible by default.

bool IG.Gr.PlotterZedGraph.DefaultAxes2IsVisible = false
static

Whether the second axes are visible by default.

bool IG.Gr.PlotterZedGraph.DefaultScale2IsVisible = false
static

Whether scale on the second axes is visible by default.

bool IG.Gr.PlotterZedGraph.DefaultZeroLine = true
static

Default value of the flag specifying whether zero lines are shown.

bool IG.Gr.PlotterZedGraph.DefaultMajorGridIsVisible = true
static

Default value of the flag indicating whether major grid lines are shown.

bool IG.Gr.PlotterZedGraph.DefaultMinorGridIsVisible = false
static

Default value of the flag indicating whether minor grid lines are shown.

bool IG.Gr.PlotterZedGraph.DefaultMajorGrid2IsVisible = true
static

Default value of the flag indicating whether major grid lines for the second axes are shown.

bool IG.Gr.PlotterZedGraph.DefaultMinorGrid2IsVisible = false
static

Default value of the flag indicating whether minor grid lines for the second axes are shown.

FontSpec IG.Gr.PlotterZedGraph._titleFont
protected
bool IG.Gr.PlotterZedGraph._xAxisIsVisible = true
private
string IG.Gr.PlotterZedGraph.DefaultXAxisLabel = "X"
static

Default label to for X axis for new plot objects.

string IG.Gr.PlotterZedGraph._xAxisLabel = DefaultXAxisLabel
protected
FontSpec IG.Gr.PlotterZedGraph._xAxisLabelFont
protected
bool IG.Gr.PlotterZedGraph._xAxisIsZeroLine = DefaultZeroLine
protected
bool IG.Gr.PlotterZedGraph._xAxisScaleIsVisible = DefaultScaleIsVisible
private
FontSpec IG.Gr.PlotterZedGraph._xAxisScaleFont
protected
bool IG.Gr.PlotterZedGraph._xAxisMajorTicAccessed = false
protected
bool IG.Gr.PlotterZedGraph._xAxisMinorTicAccessed = false
protected
bool IG.Gr.PlotterZedGraph._xAxisMajorGridIsVisible = DefaultMajorGridIsVisible
private
bool IG.Gr.PlotterZedGraph._xAxisMinorGridIsVisible = DefaultMinorGridIsVisible
private
bool IG.Gr.PlotterZedGraph._yAxisIsVisible = true
private
string IG.Gr.PlotterZedGraph.DefaultYAxisLabel = "Y"
static

Default label for Y axis for new plot objects.

string IG.Gr.PlotterZedGraph._yAxisLabel = DefaultYAxisLabel
protected
FontSpec IG.Gr.PlotterZedGraph._yAxisLabelFont
protected
bool IG.Gr.PlotterZedGraph._yAxisIsZeroLine = DefaultZeroLine
protected
bool IG.Gr.PlotterZedGraph._yAxisScaleIsVisible = DefaultScaleIsVisible
private
FontSpec IG.Gr.PlotterZedGraph._yAxisScaleFont
protected
bool IG.Gr.PlotterZedGraph._yAxisMajorTicAccessed = false
protected
bool IG.Gr.PlotterZedGraph._yAxisMinorTicAccessed = false
protected
bool IG.Gr.PlotterZedGraph._yAxisMajorGridIsVisible = DefaultMajorGridIsVisible
private
bool IG.Gr.PlotterZedGraph._yAxisMinorGridIsVisible = DefaultMinorGridIsVisible
private
bool IG.Gr.PlotterZedGraph._x2AxisIsVisible = DefaultAxes2IsVisible
private
string IG.Gr.PlotterZedGraph.DefaultX2AxisLabel = "X2"
static

Default label to for the second X axis for new plot objects.

string IG.Gr.PlotterZedGraph._x2AxisLabel = DefaultX2AxisLabel
protected
FontSpec IG.Gr.PlotterZedGraph._x2AxisLabelFont
protected
bool IG.Gr.PlotterZedGraph._x2AxisIsZeroLine = false
protected
bool IG.Gr.PlotterZedGraph._x2AxisScaleIsVisible = DefaultScale2IsVisible
private
FontSpec IG.Gr.PlotterZedGraph._x2AxisScaleFont
protected
bool IG.Gr.PlotterZedGraph._x2AxisMajorTicAccessed = false
protected
bool IG.Gr.PlotterZedGraph._x2AxisMinorTicAccessed = false
protected
bool IG.Gr.PlotterZedGraph._x2AxisMajorGridIsVisible = DefaultMajorGrid2IsVisible
private
bool IG.Gr.PlotterZedGraph._x2AxisMinorGridIsVisible = DefaultMinorGrid2IsVisible
private
bool IG.Gr.PlotterZedGraph._y2AxisIsVisible = DefaultAxes2IsVisible
private
string IG.Gr.PlotterZedGraph.DefaultY2AxisLabel = "Y2"
static

Default label for the second Y axis for new plot objects.

string IG.Gr.PlotterZedGraph._y2AxisLabel = DefaultY2AxisLabel
protected
FontSpec IG.Gr.PlotterZedGraph._y2AxisLabelFont
protected
bool IG.Gr.PlotterZedGraph._y2AxisIsZeroLine = false
protected
bool IG.Gr.PlotterZedGraph._y2AxisScaleIsVisible = DefaultScale2IsVisible
private
FontSpec IG.Gr.PlotterZedGraph._y2AxisScaleFont
protected
bool IG.Gr.PlotterZedGraph._y2AxisMajorTicAccessed = false
protected
bool IG.Gr.PlotterZedGraph._y2AxisMinorTicAccessed = false
protected
bool IG.Gr.PlotterZedGraph._y2AxisMajorGridIsVisible = DefaultMajorGrid2IsVisible
private
bool IG.Gr.PlotterZedGraph._y2AxisMinorGridIsVisible = DefaultMinorGrid2IsVisible
private
bool IG.Gr.PlotterZedGraph.disposed = false
private

Property Documentation

object IG.Gr.PlotterZedGraph.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.

int IG.Gr.PlotterZedGraph.WindowWidth
getset

Gets/sets width of the top level control containing the ZedGraph control.

int IG.Gr.PlotterZedGraph.WindowHeight
getset

Gets/sets height of the top level control containing the ZedGraph control.

ZedGraphControl IG.Gr.PlotterZedGraph.Window
getset

Zedgraph control used for plotting graphs. Warning: settes should only be used in constructors.

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

GraphPane IG.Gr.PlotterZedGraph.GraphPane
getprotected set

Gets a reference to the GraphPane instance in the current ZedGraphControl.

BoundingBox2d IG.Gr.PlotterZedGraph.BoundsCoordinates
get

Bounds of the current plot.

If AutoUpdateBoundsCoordinates == true then the bounds are updated automatically when new points are added.

These bounds are usually used just for information, but they can also be used to adjust the bounds on scales.

List<PlotZedGraphBase> IG.Gr.PlotterZedGraph.PlotObjects
getsetprotected

List of plotting objects contained on the current class.

Setter is thread safe.

Lazy evaluation - list object is automatically generated when first accessed.

int IG.Gr.PlotterZedGraph.DefaultOutputLevel
staticgetset

Gets or sets the default level of output for this class.

When accessed for the first time, the current value of Util.OutputLevel is returned.

If set to less than 0 then the first subsequent set access will return the current the current value of Util.OutputLevel.

int IG.Gr.PlotterZedGraph.OutputLevel
getset

Level of output to the console for the current object.

color IG.Gr.PlotterZedGraph.Background
getset

Background color for the current plotter.

Setter sets both colors of the gradient to the specified color, making the background color uniform.

Getter returns the first color of the two colors that define background color gradient.

color IG.Gr.PlotterZedGraph.Background1
getset

The first background color of possibly two colors that define color gradient of the plotter window's background.

color IG.Gr.PlotterZedGraph.Background2
getset

The second background color of possibly two colors that define color gradient of the plotter window's background.

double IG.Gr.PlotterZedGraph.BackgroundGradientAngle
getset

Angle of the background color gradient.

bool IG.Gr.PlotterZedGraph.ShowPlotTip
getsetprivate
bool IG.Gr.PlotterZedGraph.IsShowPointValues
getset

Whether a tooltip with point coordinates is displayed when a mouse hovers over points.

Referenced by IG.Forms.VectorFunctionPlotter1d.ApplyPlotterSettingsDefault(), and IG.Forms.VectorFunctionPlotter2d.ApplyPlotterSettingsDefault().

int IG.Gr.PlotterZedGraph.PointValuePrecision
getset

Precision of point values that are displayed in tooltips.

virtual string IG.Gr.PlotterZedGraph.Title
getset

Graph title.

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

virtual FontSpec IG.Gr.PlotterZedGraph.TitleFont
getset

Font used for graph title.

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

bool IG.Gr.PlotterZedGraph.XAxisIsVisible
getsetprivate

Whether X axis is visible.

virtual XAxis IG.Gr.PlotterZedGraph.XAxis
get

Gets the X axis of the graph.

virtual FontSpec IG.Gr.PlotterZedGraph.XAxisLabelFont
getset

Font used for X axis label.

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

bool IG.Gr.PlotterZedGraph.XAxisIsZeroLine
getsetprivate

Whether zero line on X axis is plotted or not.

bool IG.Gr.PlotterZedGraph.XAxisScaleIsVisible
getsetprivate

Whether scale is shown for X axis.

Scale IG.Gr.PlotterZedGraph.XAxisScale
getprivate

Scale for X axis.

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

FontSpec IG.Gr.PlotterZedGraph.XAxisScaleFont
getset

Settings for font on X scale.

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

MajorTic IG.Gr.PlotterZedGraph.XAxisMajorTic
get

Properties for major tixs on X axis.

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

MinorTic IG.Gr.PlotterZedGraph.XAxisMinorTic
get

Properties for minor tixs on X axis.

bool IG.Gr.PlotterZedGraph.XAxisMajorGridIsVisible
getsetprivate

Whether major grid lines for X axis are shown.

MajorGrid IG.Gr.PlotterZedGraph.XAxisMajorGrid
getprivate

Major grid lines properties for X axis.

bool IG.Gr.PlotterZedGraph.XAxisMinorGridIsVisible
getsetprivate

Whether minor grid lines for X axis are shown.

MinorGrid IG.Gr.PlotterZedGraph.XAxisMinorGrid
getprivate

Minor grid lines properties for X axis.

bool IG.Gr.PlotterZedGraph.YAxisIsVisible
getsetprivate

Whether Y axis is visible.

virtual YAxis IG.Gr.PlotterZedGraph.YAxis
get

Gets the Y axis of the graph.

virtual FontSpec IG.Gr.PlotterZedGraph.YAxisLabelFont
getset
bool IG.Gr.PlotterZedGraph.YAxisIsZeroLine
getsetprivate

Whether zero line on Y axis is plotted or not.

bool IG.Gr.PlotterZedGraph.YAxisScaleIsVisible
getsetprivate

Whether scale is shown for Y axis.

Scale IG.Gr.PlotterZedGraph.YAxisScale
getprivate

Scale for Y axis.

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

FontSpec IG.Gr.PlotterZedGraph.YAxisScaleFont
getset

Settings for font on Y scale.

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

MajorTic IG.Gr.PlotterZedGraph.YAxisMajorTic
get

Properties for major tixs on Y axis.

MinorTic IG.Gr.PlotterZedGraph.YAxisMinorTic
get

Properties for minor tixs on X axis.

bool IG.Gr.PlotterZedGraph.YAxisMajorGridIsVisible
getsetprivate

Whether major grid lines for Y axis are shown.

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

MajorGrid IG.Gr.PlotterZedGraph.YAxisMajorGrid
getprivate

Major grid lines properties for Y axis.

bool IG.Gr.PlotterZedGraph.YAxisMinorGridIsVisible
getsetprivate

Whether minor grid lines for Y axis are shown.

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

MinorGrid IG.Gr.PlotterZedGraph.YAxisMinorGrid
getprivate

Minor grid lines properties for Y axis.

bool IG.Gr.PlotterZedGraph.X2AxisIsVisible
getsetprivate

Whether X2 axis is visible.

virtual X2Axis IG.Gr.PlotterZedGraph.X2Axis
get

Gets the X2 axis of the graph.

string IG.Gr.PlotterZedGraph.X2AxisLabel
getset

Label for the second X axis.

virtual FontSpec IG.Gr.PlotterZedGraph.X2AxisLabelFont
getset

Font used for the second X axis label.

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

bool IG.Gr.PlotterZedGraph.X2AxisIsZeroLine
getsetprivate

Whether zero line on X2 axis is plotted or not.

bool IG.Gr.PlotterZedGraph.X2AxisScaleIsVisible
getsetprivate

Whether scale is shown for X axis.

Scale IG.Gr.PlotterZedGraph.X2AxisScale
getprivate

Scale for X axis.

FontSpec IG.Gr.PlotterZedGraph.X2AxisScaleFont
getset

Settings for font on X scale.

MajorTic IG.Gr.PlotterZedGraph.X2AxisMajorTic
get

Properties for major tixs on X2 axis.

MinorTic IG.Gr.PlotterZedGraph.X2AxisMinorTic
get

Properties for minor tixs on X2 axis.

bool IG.Gr.PlotterZedGraph.X2AxisMajorGridIsVisible
getsetprivate

Whether major grid lines for X2 axis are shown.

MajorGrid IG.Gr.PlotterZedGraph.X2AxisMajorGrid
getprivate

Major grid lines properties for X2 axis.

bool IG.Gr.PlotterZedGraph.X2AxisMinorGridIsVisible
getsetprivate

Whether minor grid lines for X2 axis are shown.

MinorGrid IG.Gr.PlotterZedGraph.X2AxisMinorGrid
getprivate

Minor grid lines properties for X2 axis.

bool IG.Gr.PlotterZedGraph.Y2AxisIsVisible
getset

Whether Y2 axis is visible.

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

virtual Y2Axis IG.Gr.PlotterZedGraph.Y2Axis
get

Gets the Y2 axis of the graph.

string IG.Gr.PlotterZedGraph.Y2AxisLabel
getset

Label for the second Y axis.

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

virtual FontSpec IG.Gr.PlotterZedGraph.Y2AxisLabelFont
getset

Font used for the second Y axis label.

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

bool IG.Gr.PlotterZedGraph.Y2AxisIsZeroLine
getsetprivate

Whether zero line on Y2 axis is plotted or not.

bool IG.Gr.PlotterZedGraph.Y2AxisScaleIsVisible
getsetprivate

Whether scale is shown for Y2 axis.

Scale IG.Gr.PlotterZedGraph.Y2AxisScale
getprivate

Scale for Y2 axis.

FontSpec IG.Gr.PlotterZedGraph.Y2AxisScaleFont
getset

Settings for font on Y2 scale.

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

MajorTic IG.Gr.PlotterZedGraph.Y2AxisMajorTic
get

Properties for major tixs on Y2 axis.

MinorTic IG.Gr.PlotterZedGraph.Y2AxisMinorTic
get

Properties for minor tixs on Y2 axis.

bool IG.Gr.PlotterZedGraph.Y2AxisMajorGridIsVisible
getsetprivate

Whether major grid lines for Y2 axis are shown.

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

MajorGrid IG.Gr.PlotterZedGraph.Y2AxisMajorGrid
getprivate

Major grid lines properties for Y2 axis.

bool IG.Gr.PlotterZedGraph.Y2AxisMinorGridIsVisible
getsetprivate

Whether minor grid lines for Y2 axis are shown.

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

MinorGrid IG.Gr.PlotterZedGraph.Y2AxisMinorGrid
getprivate

Minor grid lines properties for Y2 axis.


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