WAPlots.CreatePlot: Difference between revisions
Jump to navigation
Jump to search
Kate Racaza (talk | contribs) No edit summary |
Kate Racaza (talk | contribs) No edit summary |
||
Line 3: | Line 3: | ||
<onlyinclude>Returns a bitmap object that represents the plot. (VB.NET only)</onlyinclude> | <onlyinclude>Returns a bitmap object that represents the plot. (VB.NET only)</onlyinclude> | ||
== Syntax == | == Syntax == | ||
Line 23: | Line 21: | ||
== Example == | == Example == | ||
To create a plot, you must first use the [[WAPlots.AddDataset]] method to add either a calculated [[WeibullDataSet Class|WeibullDataSet]] or [[ALTADataSet Class|ALTADataSet]] object, or the [[WAPlots.AddModel]] method to add a [[CModel Class|cModel]] object to the plot. The following example uses a <code>WeibullDataSet</code> object to create the plot. | |||
'''VB.NET''' | |||
{{APIComment|'Declare a WeibullDataSet object.}} | {{APIComment|'Declare a WeibullDataSet object.}} | ||
{{APIPrefix|Dim}} WDS {{APIPrefix|As New}} WeibullDataSet | {{APIPrefix|Dim}} WDS {{APIPrefix|As New}} WeibullDataSet |
Revision as of 16:21, 24 June 2016
Member of: SynthesisAPI.WAPlots
Returns a bitmap object that represents the plot. (VB.NET only)
Syntax
.CreatePlot(PlotType, UserSettings, Width, Height)
Parameters
PlotType
- Required. The type of plot to create. Can be any WAPlotType constant.
UserSettings
- Optional. The WAPlotSettings object that represents the plot's settings.
Width
- Optional. Integer. The plot width. Default value = 1150 pixels.
Height
- Optional. Integer. The plot height. Default value = 800 pixels.
Example
To create a plot, you must first use the WAPlots.AddDataset method to add either a calculated WeibullDataSet or ALTADataSet object, or the WAPlots.AddModel method to add a cModel object to the plot. The following example uses a WeibullDataSet
object to create the plot.
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) 'Create a Probability plot and display it. This example assumes that a PictureBox control called "PictureBox1" 'already exists in the Windows Form project. PictureBox1.Image = MyPlot.CreatePlot(WAPlotType.Probability)