CNiPlots3D

3D Graph

Class CNiPlots3D Base ClassesData ItemsConstructorsDestructorsFunctionsGo to hierarchy chart    Prev page: RemoveAllNext page: Count    
Class Declared in:
NiPlots3d.h

'Overview' icon -- Shortcut to top of page. Overview

CNiPlots3D encapsulates the interface to the Plots property of a CNiGraph3D object, which allows you to access and remove plots associated with the 3D graph control.

  • Use the CNiGraph3D::Plots property to obtain the plots collection for the graph.
  • Use the Add function to create additional plots. Add returns a CNiPlot3D object, which represents the new plot.
  • Use the Item function to access existing plots in the collection. This function can access plots by either name or index.
  • Use the Remove function to remove existing plots from the collection. This function can access plots by either name or index.
  • Use the RemoveAll function to remove all plots from the graph.

Hierarchy Chart Hierarchy Chart

'Base Classes' icon -- Shortcut to top of page. Base Classes

'Data Items' icon -- Shortcut to top of page. Data Items

Public data short Count Returns the number of plots in the collection.

'Constructors' icon -- Shortcut to top of page. Constructors

Public constructor

CNiPlots3D()

Default constructor.
Public constructor

CNiPlots3D( CWPlots3D_CI* pCustom, CNiInterface::ThreadAccess option )

Constructor that attaches to the specified CWPlots3D_CI pointer.
Public constructor

CNiPlots3D( const CNiPlots3D& source )

Copy constructor.

'Destructors' icon -- Shortcut to top of page. Destructors

Public destructor

~CNiPlots3D()

Destructor.

'Functions' icon -- Shortcut to top of page. Functions

Public function CNiPlot3D

Add()

Adds a plot to the collection and returns the new plot.
Public function static const IID &

GetIid()

Returns the globally unique identifier (GUID) of the ActiveX interface to which this class connects.
Public function CNiPlot3D

Item( long plotIndex )

Returns the specified plot from the collection.
Public function CNiPlot3D

Item( const CString& plotName )

Returns the specified plot from the collection.
Public function const CNiPlots3D &

operator =( const CNiPlots3D& source )

Assignment operator.
Public function void

Remove( long plotIndex )

Removes the specified plot from the collection.
Public function void

Remove( const CString& plotName )

Removes the specified plot from the collection.
Public function void

RemoveAll()

Removes all plots from the collection.

Shortcut to top of page. Examples

1. Set the first plot in the graph to auto scale.

    CNiGraph graph;
    CNiPlot3D plot = graph.Plots.Item(1);
    plot.AutoScale = true;

2. Set the point style on the first plot in the graph.

    CNiGraph graph;
    graph.Plots.Item(1).PointStyle = CNiPlot3D::PointAsterisk;

3. Add a new plot to the graph.

    CNiGraph graph;
    CNiPlot3D plot = graph.Plots.Add();
    plot.FillToBase = true;

4. Remove all plots from the graph.

    CNiGraph graph;
    graph.Plots.RemoveAll();

5. Change the name of the first plot to "Velocity".

    CNiGraph graph;
    graph.Plots.Item(1).Name = "Velocity";

Subsequent accesses to the plot must now use "Velocity" as the item name. For example,

    graph.Plots.Item("Velocity").Visible = true;