WAPlots.CreatePlot: Difference between revisions

From ReliaWiki
Jump to navigation Jump to search
No edit summary
Line 12: Line 12:
{{APIName|UserSettings}}
{{APIName|UserSettings}}
{{APIPrefix|As}}
{{APIPrefix|As}}
{{APIName|[[WAPlotSettings]]}}
{{APIName|[[WAPlotSettings Class|WAPlotSettings ]]}}
=
=
{{APIPrefix|Nothing}}
{{APIPrefix|Nothing}}

Revision as of 18:11, 6 February 2014



Create the plot based on the WeibullDataSet and/or the ALTADataSet entered into the WAPlots. Returns a bitmap of the plot.

Method Syntax

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

Creates a bitmap containing the plot image.

Parameters

PlotType Set the type of plot desired, of the WAPlotType enum.

UserSettings Sets the plot settings via an instance of the WAPlotSettings class.

Width Set the width, in pixels, of the finished plot.

Height Set 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)