WAPlots Class: Difference between revisions

From ReliaWiki
Jump to navigation Jump to search
No edit summary
Line 1: Line 1:
{{Template:APIClass|WAPlots Class| }}
{{Template:API}}{{Template:APIBreadcrumb}}
{{Template:WAPlots Class.Cmt}}
 
 
Represents a plot based on the fitted model of a [[WeibullDataSet Class|WeibullDataSet]] or [[ALTADataSet Class|ALTADataSet]] object.


== Constructors==
== Constructors==
*WAPlots {{APIComment|Creates a new WAPlots object.}}
{| {{APITable}}
|-
| style="width: 180px;"|WAPlots||Creates an instance of the WAPlots class.
|}
 


== Methods  ==
== Methods  ==
*[[WAPlots.AddDataset|AddDataset( WADataSet )]] {{APIComment|{{Template:WAPlots.AddDataSet.Cmt}}}}
{| {{APITable}}
*[[WAPlots.CreatePlot|CreatePlot( WAPlotType, [WAPlotSettings], [Integer], [Integer] )]] {{APIComment|{{Template:WAPlots.CreatePlot.Cmt}}}}
|-
*[[WAPlots.CreatePlotVB6|CreatePlotVB6( WAPlotType, [WAPlotSettings], [Integer], [Integer] )]] {{APIComment|{{Template:WAPlots.CreatePlotVB6.Cmt}}}}
| style="width: 180px;"|[[WAPlots.AddDataset|AddDataset]]||{{:WAPlots.AddDataset}}
*[[WAPlots.Clear|Clear]] {{APIComment|{{Template:WAPlots.Clear.Cmt}}}}
|-
|[[WAPlots.Clear|Clear]]||{{:WAPlots.Clear}}
|-
|[[WAPlots.CreatePlot|CreatePlot]]||{{:WAPlots.CreatePlot}}
|-
|[[WAPlots.CreatePlotVB6|CreatePlotVB6]]||{{:WAPlots.CreatePlotVB6}}
|}
 


== Properties ==
== Properties ==
*ErrorHappened (as ''boolean'') {{APIComment|Whether an error happened during the creation of the plot.}}
{| {{APITable}}
*ErrorMessage (as ''string'') {{APIComment|The error that happened during the creation of the plot. Set only if ErrorHappened is true.}}
|-
 
| style="width: 180px;"|ErrorHappened||Indicates whether an error occurred during the creation of the plot. '''Boolean'''. Read-only.
== Usage Example ==
|-
This example demonstrates how to fit a times-to-failure data set to a life distribution and then use the fitted distribution to create a plot. Full application examples are available at [[Synthesis_API_Reference#Application_Examples]].
|ErrorMessage||Gets the description of the error that occurred during the creation of the plot. Applies only if ErrorHappened is true. '''String'''.
 
|}
{{APIComment|'Initialize a new WeibullDataSet object. See [[WeibullDataSet Class|WeibullDataSet]].}}
  Dim ADS As New WeibullDataSet("DataSet1")
 
{{APIComment|'Set the life distribution.}}
  WDS.AnalysisSettings.Distribution = WeibullSolverDistribution.Weibull
  WDS.AnalysisSettings.Parameters = WeibullSolverNumParameters.MS_2Parameter
 
{{APIComment|'Set the applicable analysis settings.}}
  WDS.AnalysisSettings.Analysis = WeibullSolverMethod.MLE
  WDS.AnalysisSettings.RankingMethod = WeibullSolverRankMethod.Median
  WDS.AnalysisSettings.UseRSRegression = False
  WDS.AnalysisSettings.ConfBounds = WeibullSolverCBMethod.FisherMatrix
  WDS.AnalysisSettings.SortBeforeCalculations = True
  WDS.AnalysisSettings.UngroupGroupedData = False
 
{{APIComment|'Set the Application Setup options.}}
  WDS.AnalysisSettings.UseSpecialSort = True
  WDS.GeneralSettings.AllowBiasingNormal = False
  WDS.GeneralSettings.DiscardNegLocation = False
  WDS.GeneralSettings.ResetExpLocation = False
  WDS.GeneralSettings.Use3PTrueMLE = False
  WDS.GeneralSettings.UseExtendedGGamma = False
  WDS.GeneralSettings.UsePlottedYPoints = False
  WDS.GeneralSettings.WarnNegLocation = False
 
{{APIComment|'Add failure times.}}
  WDS.AddFailure(16, 1)
  WDS.AddFailure(34, 1)
  WDS.AddFailure(53, 1)
  WDS.AddFailure(75, 1)
  WDS.AddFailure(93, 1)
  WDS.AddFailure(120, 1)
 
{{APIComment|'Add 4 suspensions.}}
  WDS.AddFailure(120, 4)
 
{{APIComment|'Fit failure times to the specified distribution.}}
  WDS.Calculate()
 
{{APIComment|'Create a WAPlots object.}}
  Dim WeibullALTAPlot As New WAPlots
 
{{APIComment|'Initialize a new WAPlotSettings object with customized plot settings. See [[WAPlotSettings Class|WAPlotSettings]].}}
  Dim NewPlotSettings As New WAPlotSettings
  NewPlotSettings.UserName = User Name
  NewPlotSettings.UserCompany = Company
  NewPlotSettings.AutoscaleX = True
  NewPlotSettings.AutoscaleY = True
  NewPlotSettings.ShowTargetReliability = False
  NewPlotSettings.ShowTargetTime = False
  NewPlotSettings.ShowTargetMarker = False
  NewPlotSettings.ShowSuspensionPoints = True
  NewPlotSettings.ShowLeftCensoredPoints = True
  NewPlotSettings.ShowLinesAroundInterval = True
  NewPlotSettings.AdjustMLEPoints = True
  NewPlotSettings.StraightenGammaLine = True
  NewPlotSettings.ShowNumberInGroup = True
  NewPlotSettings.PlotXPrecision = 3
  NewPlotSettings.PlotyPrecision = 3
  NewPlotSettings.PlotXTolerance = 6
  NewPlotSettings.PlotYTolerance = 6
  NewPlotSettings.ConfBounds_TypesSelected = ConfBoundsTypes.None
 
{{APIComment|'Add the WeibullDataSet to the WAPlots object.}}
  WeibullALTAPlot.AddDataset(WDS)
 
{{APIComment|'Define an image object to store the plot picture.}}
  Dim PlotPicture as Image
 
{{APIComment|'Create an image of a reliability vs. time plot and save}}
{{APIComment|'it in PlotPicture using the customized plot settings.}}
  PlotPicture = WeibullALTAPlot.CreatePlot(WAPlotType.Reliability, NewPlotSettings)

Revision as of 16:57, 20 April 2016

APIWiki.png


Member of: SynthesisAPI


Represents a plot based on the fitted model of a WeibullDataSet or ALTADataSet object.

Constructors

Name Description
WAPlots Creates an instance of the WAPlots class.


Methods

Name Description
AddDataset Adds a WeibullDataSet or ALTADataSet object to the plot.
Clear Removes the object that was added to the plot, which is required before a new object can be added.
CreatePlot Returns a bitmap object that represents the plot. (.NET only)
CreatePlotVB6 Returns a bitmap object that represents the plot. (VBA/VB6 only.)


Properties

Name Description
ErrorHappened Indicates whether an error occurred during the creation of the plot. Boolean. Read-only.
ErrorMessage Gets the description of the error that occurred during the creation of the plot. Applies only if ErrorHappened is true. String.