WAPlots Class: Difference between revisions

From ReliaWiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 15: Line 15:
*'''[[WAPlots.ErrorHappened|ErrorHappened]]''' {{APIComment|Whether an error happened during the last plotting.}}
*'''[[WAPlots.ErrorHappened|ErrorHappened]]''' {{APIComment|Whether an error happened during the last plotting.}}
*'''[[WAPlots.ErrorMessage|ErrorMessage]]''' {{APIComment|The error that happened during the last plotting. Only set if ErrorHappened returns true.}}
*'''[[WAPlots.ErrorMessage|ErrorMessage]]''' {{APIComment|The error that happened during the last plotting. Only set if ErrorHappened returns true.}}
== Formatted Usage Example ==
{{APIComment|Create a new Weibull/ALTA Plot instance.}}
        Dim WeibullALTAPlot As New WAPlots
{{APIComment|Declare a WeibullDataSet. See [[New WeibullDataSet]] for additional details.}}
        Dim WDS As New WeibullDataSet
{{APIComment|Add values to the raw data. See [[WeibullDataSet.AddFailure|AddFailure]] for additional details.}}
        WDS.AddFailure(1, 1)
        WDS.AddFailure(2, 1)
        WDS.AddFailure(3, 1)
{{APIComment|Add the WeibullDataSet to the WAPlots.}}
        WeibullALTAPlot.AddDataset(WDS)
{{APIComment|Create the WAPlot.  In this example, it will create a Probability plot.}}
        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 18:15, 6 February 2014



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

Constructors

Methods

  • Clear Removes all data sets from plotting collection.
  • AddDataset Adds Weibull or ALTA data set for subsequent plotting.
  • CreatePlot Creates a bitmap containing the plot image.
  • CreatePlotVB6 For VB6/VBA users only - use it instead of CreatePlot. Returns the picture containing the image of the plot.

Properties

  • ErrorHappened Whether an error happened during the last plotting.
  • ErrorMessage The error that happened during the last plotting. Only set if ErrorHappened returns true.

Formatted 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)

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)

If there were any issues creating the plot, ErrorHappened would be True, and ErrorString will display the reason.

       Dim ErrorString as String
       If WeibullALTAPlot.ErrorHappened Then
           ErrorString = WeibullALTAPlot.ErrorMessage
       End If