WAPlots.CreatePlotVB6: Difference between revisions

From ReliaWiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 3: Line 3:


== Syntax ==
== Syntax ==
*CreatePlotVB6( PlotType {{APIPrefix|As}} [[WAPlotType]], {{APIPrefix|Optional }} UserSettings {{APIPrefix|As}} [[WAPlotSettings Class|WAPlotSettings]] = {{APIPrefix|Nothing}} , {{APIPrefix|Optional }} Width {{APIPrefix|As Integer}} = 1150, {{APIPrefix|Optional }} Height {{APIPrefix|As Integer}} = 800) {{APIPrefix|As Object}}
*CreatePlotVB6( PlotType {{APIPrefix|As}} [[WAPlotType Enumeration|WAPlotType]], {{APIPrefix|Optional }} UserSettings {{APIPrefix|As}} [[WAPlotSettings Class|WAPlotSettings]] = {{APIPrefix|Nothing}} , {{APIPrefix|Optional }} Width {{APIPrefix|As Integer}} = 1150, {{APIPrefix|Optional }} Height {{APIPrefix|As Integer}} = 800) {{APIPrefix|As Object}}


Parameters
Parameters

Revision as of 21:16, 3 March 2014


Returns an IPicture object with the specified plot. For VBA/VB6 only.

Syntax

  • CreatePlotVB6( PlotType As WAPlotType, Optional UserSettings As WAPlotSettings = Nothing , Optional Width As Integer = 1150, Optional Height As Integer = 800) As Object

Parameters

PlotType: The plot type, specified with the WAPlotType enumeration.
UserSettings: The plot settings, specified as a WAPlotSettings object.
Width: The width, in pixels, of the finished plot.
Height: The height, in pixels, of the finished plot.

Usage Example

Create a new Weibull/ALTA Plot instance.

       Dim WeibullALTAPlot As New WAPlots

Declare a WeibullDataSet. See New WeibullDataSet for additional details.

       Dim WDS As New WeibullDataSet

Add values to the raw data. See WeibullDataSet.AddFailure for additional details.

       WDS.AddFailure(1, 1)
       WDS.AddFailure(2, 1)
       WDS.AddFailure(3, 1)

Calculate the WeibullDataSet.

       WDS.Calculate

Add the WeibullDataSet to the WAPlots.

       WeibullALTAPlot.AddDataset(WDS)

Create the WAPlot. In this example, it will create a Probability plot.

       Dim FinalPlot As Bitmap = WeibullALTAPlot.CreatePlotVB6(WAPlotType.Probability)