WAPlots.CreatePlot: Difference between revisions
Jump to navigation
Jump to search
Chris Kahn (talk | contribs) No edit summary |
Chris Kahn (talk | contribs) |
||
Line 15: | Line 15: | ||
== Usage Example == | == Usage Example == | ||
{{APIComment|Create a new Weibull/ALTA Plot instance.}} | {{APIComment|'Create a new Weibull/ALTA Plot instance. See [[WAPlots.CreatePlot|CreatePlot]].}} | ||
Dim WeibullALTAPlot As New WAPlots | |||
{{APIComment|Declare a WeibullDataSet. See [[ | {{APIComment|'Declare a WeibullDataSet. See [[WeibullDataSet Class|WeibullDataSet]].}} | ||
Dim WDS As New WeibullDataSet | |||
{{APIComment|Add values to the raw data. See [[WeibullDataSet.AddFailure|AddFailure]] | {{APIComment|'Add values to the raw data. See [[WeibullDataSet.AddFailure|AddFailure]].}} | ||
WDS.AddFailure(1, 1) | |||
WDS.AddFailure(2, 1) | |||
WDS.AddFailure(3, 1) | |||
{{APIComment| | {{APIComment|'Specify that the will be based on the WDS data set.}} | ||
WeibullALTAPlot.AddDataset(WDS) | |||
{{APIComment|'Create a Probability plot and save it as a bitmap file. See [[WAPlotType Enumeration|WAPlotType]] for plot types.}} | |||
Dim FinalPlot As Bitmap = WeibullALTAPlot.CreatePlot(WAPlotType.Probability) | |||
{{APIComment|Create | |||
Revision as of 17:10, 28 April 2014
Returns a bitmap object with the specified plot. Not for use with VB6/VBA.
Syntax
- CreatePlot( PlotType As WAPlotType, Optional UserSettings As WAPlotSettings = Nothing , Optional Width As Integer = 1150, Optional Height As Integer = 800) As System.Drawing.Bitmap
Parameters
- PlotType: The plot type, specified with the WAPlotType enumeration.
- UserSettings: The plot settings, specified as a WAPlotSettings object.
- Width: The width, in pixels, of the finished plot.
- Height: The height, in pixels, of the finished plot.
Usage Example
'Create a new Weibull/ALTA Plot instance. See CreatePlot. Dim WeibullALTAPlot As New WAPlots 'Declare a WeibullDataSet. See WeibullDataSet. Dim WDS As New WeibullDataSet 'Add values to the raw data. See AddFailure. WDS.AddFailure(1, 1) WDS.AddFailure(2, 1) WDS.AddFailure(3, 1) 'Specify that the will be based on the WDS data set. WeibullALTAPlot.AddDataset(WDS) 'Create a Probability plot and save it as a bitmap file. See WAPlotType for plot types. Dim FinalPlot As Bitmap = WeibullALTAPlot.CreatePlot(WAPlotType.Probability)