WAPlots Class: Difference between revisions

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


== Usage Example ==
== Usage Example ==
{{APIComment|Create a new Weibull/ALTA Plot instance. See [[WAPlots.CreatePlot|CreatePlot]] for additional details.}}  
{{APIComment|'Create a new Weibull/ALTA Plot instance. See [[WAPlots.CreatePlot|CreatePlot]].}}  
        Dim WeibullALTAPlot As New WAPlots
  Dim WeibullALTAPlot As New WAPlots
 
{{APIComment|'Declare a WeibullDataSet. See [[WeibullDataSet Class|WeibullDataSet]].}}
  Dim WDS As New WeibullDataSet


{{APIComment|Declare a WeibullDataSet. See [[New WeibullDataSet]] for additional details.}}
{{APIComment|'Add values to the raw data. See [[WeibullDataSet.AddFailure|AddFailure]].}}
        Dim WDS As New WeibullDataSet
  WDS.AddFailure(1, 1)
 
  WDS.AddFailure(2, 1)
{{APIComment|Add values to the raw data. See [[WeibullDataSet.AddFailure|AddFailure]] for additional details.}}
  WDS.AddFailure(3, 1)
        WDS.AddFailure(1, 1)
 
        WDS.AddFailure(2, 1)
{{APIComment|'Add the WeibullDataSet to the WAPlots.}}
        WDS.AddFailure(3, 1)
  WeibullALTAPlot.AddDataset(WDS)
 
{{APIComment|Add the WeibullDataSet to the WAPlots. See [[New WeibullDataSet|New WeibulDataSet]] for additional details.}}
{{APIComment|'Create a Probability plot. See [[WAPlotType Enumeration|WAPlotType]] for plot types.}}
        WeibullALTAPlot.AddDataset(WDS)
  Dim FinalPlot As Bitmap = WeibullALTAPlot.CreatePlot(WAPlotType.Probability)
 
{{APIComment|Create the WAPlot.  In this example, it will create a Probability plot. See [[WAPlotType Enumeration|WAPlotType]] for additional details.}}
        Dim FinalPlot As Bitmap = WeibullALTAPlot.CreatePlot(WAPlotType.Probability)
 
{{APIComment|If there were any issues creating the plot, [[WAPlots.ErrorHappened|ErrorHappened]] would be True, and ErrorString will display the reason.}}
        Dim ErrorString as String
        If WeibullALTAPlot.[[WAPlots.ErrorHappened|ErrorHappened]] Then
            ErrorString = '''WeibullALTAPlot.ErrorMessage'''
        End If

Revision as of 17:08, 28 April 2014


Creates a plot based on a fitted model in a WeibullDataSet or ALTADataSet object.

Constructors

  • WAPlots Creates a new WAPlots object.

Methods

Properties

  • ErrorHappened (as boolean) Whether an error happened during the creation of the plot.
  • ErrorMessage (as string) The error that happened during the creation of the plot. Set only if ErrorHappened is true.

Usage Example

 'Create a new Weibull/ALTA Plot instance. See CreatePlot.  
 Dim WeibullALTAPlot As New WAPlots
 
 'Declare a WeibullDataSet. See WeibullDataSet. 
 Dim WDS As New WeibullDataSet
 'Add values to the raw data. See AddFailure. 
 WDS.AddFailure(1, 1)
 WDS.AddFailure(2, 1)
 WDS.AddFailure(3, 1)
 
 'Add the WeibullDataSet to the WAPlots. 
 WeibullALTAPlot.AddDataset(WDS)

 'Create a Probability plot. See WAPlotType for plot types. 
 Dim FinalPlot As Bitmap = WeibullALTAPlot.CreatePlot(WAPlotType.Probability)