![]() |
CNiPlot | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Class |
Declared in: NiPlot.h |
Overview
CNiPlot encapsulates the interface to a single plot of a graph control, which allows you to modify its appearance and behavior.
You get individual plots using the Plots property on a CNiGraph object.
Note: To specify a date/time value, you must convert your date or time value to a double. A date is implemented as a floating-point value with the integer part of the number measuring days from midnight, 30 December 1899, and the fractional part representing the time of day. The absolute value of the fractional part of the number represents the time as a fraction of a day. Thus, 1 second equals 1 / 24 hours / 60 minutes, which is 1/86400 or approximately 1.157407e-5. So, midnight, 31 December 1899, is represented by 1.0. Similarly, 6 AM, 1 January 1900, is represented by 2.25, and midnight, 29 December 1899, is -1.0. However, 6 AM, 29 December 1899, is -1.25.
Base Classes
Data Items
![]() |
bool | AutoScale | Specifies if the extents of the data in the plot affect the extents of an autoscaling axis. |
![]() |
CNiPlot | BasePlot | Specifies a plot to use for Y values when FillToBase or LineToBase is enabled. |
![]() |
double | BaseValue | Specifies the Y value to use when FillToBase or LineToBase is enabled. |
![]() |
double | DefaultXFirst | Specifies the default value used by the overloaded versions of the PlotY function that do not take the xFirst parameter. |
![]() |
double | DefaultXInc | Specifies the default value used by the overloaded versions of the PlotY and ChartY functions that do not take the xInc parameter. |
![]() |
bool | DefaultXInFirstRow | Specifies the default value used by the overloaded versions of the PlotXY and ChartXY functions that do not take the xInFirstRow parameter. |
![]() |
bool | Enabled | Specifies if the plot generates mouse events when CNiGraph::TrackMode = CNiGraph::TrackAllEvents and the plot is visible. |
![]() |
CNiColor | FillColor | Specifies the color to use for filling to the BaseValue or BasePlot. |
![]() |
bool | FillToBase | Specifies if the function fills the area between the plot and the CNiPlot::BaseValue or CNiPlot::BasePlot. |
![]() |
CNiColor | LineColor | Specifies the color of line that connects points in the plot. |
![]() |
LineStyles | LineStyle | Specifies the line style for connecting points on a plot. |
![]() |
bool | LineToBase | Specifies if lines connect the data points to the CNiPlot::BaseValue or CNiPlot::BasePlot. |
![]() |
CNiColor | LineToBaseColor | Specifies the color of lines connecting data points to the CNiPlot::BaseValue or CNiPlot::BasePlot. |
![]() |
short | LineWidth | Specifies the width of the plotting line. |
![]() |
bool | MultiPlot | Determines if the plot or chart functions can use this plot. |
![]() |
CString | Name | Specifies the name of the plot. |
![]() |
CNiColor | PointColor | Specifies the color for points on a plot. |
![]() |
PointStyles | PointStyle | Specifies the point style for drawing points on a plot. |
![]() |
bool | TempPlot | Specifies if you can discard a plot if the next CNiGraph plot or chart function does not need it. |
![]() |
bool | Visible | Specifies if the plot is visible or hidden. |
![]() |
CNiAxis | XAxis | Gets the x axis for a plot. |
![]() |
CNiAxis | YAxis | Specifies the y axis for a plot. |
Constructors
![]() |
CNiPlot() |
Default constructor. | |
![]() |
CNiPlot( CWPlot_CI* pCustom, CNiInterface::ThreadAccess option ) |
Constructor that attaches to the specified CWPlot_CI pointer. | |
![]() |
CNiPlot( const CNiPlot& source ) |
Copy constructor. |
Destructors
Functions
![]() |
void | Charts a vector of Y data against a vector of X data. | |
![]() |
void | Charts a matrix of data as an X-Y plot. | |
![]() |
void | Charts a matrix of data as an X-Y plot. | |
![]() |
void | ChartXY( double x, double y ) |
Charts a matrix of data as an X-Y plot. |
![]() |
void | Charts a vector of data. | |
![]() |
void | Charts a vector of data. | |
![]() |
void | ChartY( double y, double xInc ) |
Charts a point of data. |
![]() |
void | ChartY( double y ) |
Charts a point of data. |
![]() |
void | Clears the data currently displayed in the plot. | |
![]() |
static const IID & | GetIid() |
Returns the globally unique identifier (GUID) of the ActiveX interface to which this class connects. |
![]() |
const CNiPlot & | Assignment operator. | |
![]() |
void | Plots a vector of Y data against a vector of X data. | |
![]() |
void | Plots a matrix of data as an X-Y plot. | |
![]() |
void | Plots a matrix of data as an X-Y plot. | |
![]() |
void | PlotXY( double x, double y ) |
Plots a single point of data as an X-Y plot. |
![]() |
void | Plots a vector of data. | |
![]() |
void | Plots a vector of data. | |
![]() |
void | Plots a vector of data. |
Example
// Add a sine wave plot to the graph.
CNiGraph graph; CNiReal64Vector wfm(1000); CNiMath::SineWave(wfm); graph.PlotY(wfm);
// Get the plot from the graph and change its line style.
CNiPlot plot = graph.Plots.Item(1); plot.LineStyle = CNiPlot::LineDash;