WAPlots.Clear: Difference between revisions

From ReliaWiki
Jump to navigation Jump to search
m (Protected "WAPlots.Clear" ([edit=sysop] (indefinite) [move=sysop] (indefinite)) [cascading])
No edit summary
 
(7 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{Template:APIClass|WAPlots Class|WAPlots}}
{{Template:API}}{{Template:APIBreadcrumb|.[[WAPlots_Class|WAPlots]]}}


Clear the data set information in the WAPlots instance.


== Method Syntax ==
<onlyinclude>Removes the object that was added to the plot, which is required before a new object can be added.</onlyinclude>
{{APIName|Clear()}}


{{APIComment|Removes all data sets from the plotting collection.}}
== Syntax ==
'''.Clear()'''


== Usage Example ==
== Example ==
{{APIComment|Create a new Weibull/ALTA Plot instance.}}
        Dim WeibullALTAPlot As New WAPlots


{{APIComment|Declare a WeibullDataSet. See [[New WeibullDataSet]] for additional details.}}
'''VBA'''
        Dim WDS as New WeibullDataSet
{{APIComment|'Declare a WeibullDataSet object.}}
  {{APIPrefix|Dim}} WDS {{APIPrefix|As New}} WeibullDataSet
 
{{APIComment|'Add failures to the data set.}}
  {{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|'Remove the data set from the plot.}}
  MyPlot.Clear


{{APIComment|Add values to the raw data. See [[WeibullDataSet.AddFailure|AddFailure]] for additional details.}}
'''VB.NET'''
        WDS.AddFailure(1, 1)
        WDS.AddFailure(2, 1)
{{APIComment|'Declare a WeibullDataSet object.}}
        WDS.AddFailure(3, 1)
  {{APIPrefix|Dim}} WDS {{APIPrefix|As New}} WeibullDataSet
 
 
{{APIComment|Add the WeibullDataSet to the WAPlots.}}
{{APIComment|'Add failures to the data set.}}
        WeibullALTAPlot.AddDataset(WDS)
  WDS.AddFailure(1, 1)
 
  WDS.AddFailure(2, 1)
{{APIComment|Clear the datasets in WAPlots.}}
  WDS.AddFailure(3, 1)
        '''WeibullALTAPlot.Clear'''
{{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|'Remove the data set from the plot.}}
  MyPlot.Clear

Latest revision as of 17:50, 24 June 2016

APIWiki.png


Member of: SynthesisAPI.WAPlots


Removes the object that was added to 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