WAPlots.CreatePlot: Difference between revisions

From ReliaWiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 2: Line 2:
{{Template:WAPlots.CreatePlot.Cmt}}
{{Template:WAPlots.CreatePlot.Cmt}}


== Method Syntax ==
== Syntax ==
{{APIName|CreatePlot(}}
*CreatePlot( 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 System.Drawing.Bitmap}}
{{APIPrefix|ByVal}}
{{APIName|PlotType}}
{{APIPrefix|As}}
{{APIName|[[WAPlotType]],}}
{{APIPrefix|Optional ByVal}}
{{APIName|UserSettings}}
{{APIPrefix|As}}
{{APIName|[[WAPlotSettings Class|WAPlotSettings ]]}}
=
{{APIPrefix|Nothing}}
{{APIName|,}}
{{APIPrefix|Optional ByVal}}
{{APIName|Width}}
{{APIPrefix|As Integer}}
=
{{APIName|1150,}}
{{APIPrefix|Optional ByVal}}
{{APIName|Height}}
{{APIPrefix|As Integer}}
=
{{APIName|800)}}
{{APIPrefix|As System.Drawing.Bitmap}}
{{APIComment|Creates a bitmap containing the plot image.}}


== Parameters ==
Parameters
'''PlotType'''
:''PlotType'': The plot type, specified with the [[WAPlotType]] enumeration.
Set the type of plot desired, of the [[WAPlotType]] enum.


'''UserSettings'''
:''UserSettings'': The plot settings, specified as a [[WAPlotSettings Class|WAPlotSettings]] object.
Sets the plot settings via an instance of the [[WAPlotSettings Class|WAPlotSettings ]] class.


'''Width'''
:''Width'': The width, in pixels, of the finished plot.
Set the width, in pixels, of the finished plot.


'''Height'''
:''Height'': The height, in pixels, of the finished plot.
Set the height, in pixels, of the finished plot.


== Usage Example ==
== Usage Example ==

Revision as of 20:52, 3 March 2014


Returns a bitmap object with the specified plot. Not for use with VB6/VBA.

Syntax

  • CreatePlot( PlotType As WAPlotType, Optional UserSettings As WAPlotSettings = Nothing , Optional Width As Integer = 1150, Optional Height As Integer = 800) As System.Drawing.Bitmap

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 AddFailure for additional details.

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

Calculate the WeibullDataSet. See CalculateBestFit for additional details.

       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.CreatePlot(WAPlotType.Probability)