WAPlots.Clear: Difference between revisions

From ReliaWiki
Jump to navigation Jump to search
No edit summary
Line 1: Line 1:
{{Template:APIClass|WAPlots Class|WAPlots}}
{{Template:API}}{{Template:APIBreadcrumb|.[[WAPlots_Class|WAPlots]]}}
{{Template:WAPlots.Clear.Cmt}}
 
 
<onlyinclude>Removes the added [[WeibullDataSet Class|WeibullDataSet ]] or [[ALTADataSet Class|ALTADataSet]] object from the plot, which is required before a new object can be added.</onlyinclude>


== Syntax ==
== Syntax ==
*Clear()
'''.Clear()'''
 
== Example ==


== Usage Example ==
'''VBA'''
<div style="margin-right: 150px;">
  {{APIComment|'Create a new WAPlots object.}}
  {{APIComment|'Declare a WeibullDataSet object.}}
  Dim WeibullALTAPlot As New WAPlots
  {{APIPrefix|Dim}} WDS {{APIPrefix|As New}} WeibullDataSet
    
    
  {{APIComment|'Declare a WeibullDataSet. See [[WeibullDataSet Class|WeibullDataSet]].}}
  {{APIComment|'Add failures to the data set.}}
  Dim WDS as New WeibullDataSet
  {{APIPrefix|Call}} WDS.AddFailure(1, 1)
  {{APIPrefix|Call}} WDS.AddFailure(2, 1)
  {{APIPrefix|Call}} WDS.AddFailure(3, 1)
{{APIComment|'Fit the data to the life distribution, using all default analysis settings.}} 
    WDS.Calculate
{{APIComment|'Create a WAPlots object.}}
  {{APIPrefix|Dim}} MyPlot {{APIPrefix|As New}} WAPlots
{{APIComment|'Add the calculated data set to the plot.}}
  {{APIPrefix|Call}} MyPlot.AddDataset(WDS)
    
    
  {{APIComment|'Add values to the raw data. See [[WeibullDataSet.AddFailure|AddFailure]].}}
  {{APIComment|'Remove the data set from the plot.}}
  WDS.AddFailure(1, 1)
  MyPlot.Clear
  WDS.AddFailure(2, 1)
 
  WDS.AddFailure(3, 1)
'''VB.NET'''
{{APIComment|'Declare a WeibullDataSet object.}}
  {{APIPrefix|Dim}} WDS {{APIPrefix|As New}} WeibullDataSet
    
    
  {{APIComment|'Add the WeibullDataSet to the WAPlots object.}}
  {{APIComment|'Add failures to the data set.}}
  WeibullALTAPlot.AddDataset(WDS)
  WDS.AddFailure(1, 1)
  WDS.AddFailure(2, 1)
  WDS.AddFailure(3, 1)
{{APIComment|'Fit the data to the life distribution, using all default analysis settings.}} 
    WDS.Calculate
{{APIComment|'Create a WAPlots object.}}  
  {{APIPrefix|Dim}} MyPlot {{APIPrefix|As New}} WAPlots
{{APIComment|'Add the calculated data set to the plot.}}
  MyPlot.AddDataset(WDS)
    
    
  {{APIComment|'Clear the dataset in the WAPlots object.}}
  {{APIComment|'Remove the data set from the plot.}}
  WeibullALTAPlot.Clear
  MyPlot.Clear
</div>

Revision as of 16:49, 20 April 2016

APIWiki.png


Member of: SynthesisAPI.WAPlots


Removes the added WeibullDataSet or ALTADataSet object from the plot, which is required before a new object can be added.

Syntax

.Clear()

Example

VBA

 'Declare a WeibullDataSet object. 
  Dim WDS As New WeibullDataSet
 
 'Add failures to the data set. 
  Call WDS.AddFailure(1, 1)
  Call WDS.AddFailure(2, 1)
  Call WDS.AddFailure(3, 1)

 'Fit the data to the life distribution, using all default analysis settings.   
   WDS.Calculate

 'Create a WAPlots object.  
  Dim MyPlot As New WAPlots

 'Add the calculated data set to the plot. 
  Call MyPlot.AddDataset(WDS)
 
 'Remove the data set from the plot. 
  MyPlot.Clear
VB.NET

 'Declare a WeibullDataSet object. 
  Dim WDS As New WeibullDataSet
 
 'Add failures to the data set. 
  WDS.AddFailure(1, 1)
  WDS.AddFailure(2, 1)
  WDS.AddFailure(3, 1)

 'Fit the data to the life distribution, using all default analysis settings.   
   WDS.Calculate

 'Create a WAPlots object.  
  Dim MyPlot As New WAPlots

 'Add the calculated data set to the plot. 
  MyPlot.AddDataset(WDS)
 
 'Remove the data set from the plot. 
  MyPlot.Clear