WAPlots.CreatePlot: Difference between revisions

From ReliaWiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
{{Template:APIClass|WAPlots Class|WAPlots}}
{{Template:API}}{{Template:APIBreadcrumb|.[[WAPlots_Class|WAPlots]]}}
{{Template:WAPlots.CreatePlot.Cmt}}
 
 
<onlyinclude>Returns a bitmap object that represents the plot. (VB.NET only)</onlyinclude>


== Syntax ==
== Syntax ==
*CreatePlot( PlotType {{APIPrefix|As}} [[WAPlotType Enumeration|WAPlotType]], {{APIPrefix|Optional}} UserSettings {{APIPrefix|As}} [[WAPlotSettings Class|WAPlotSettings ]] = {{APIPrefix|Nothing}} , {{APIPrefix|Optional}} Width {{APIPrefix|As Integer}} = 1150, {{APIPrefix|Optional }} Height {{APIPrefix|As Integer}} = 800) {{APIPrefix|As System.Drawing.Bitmap}}
'''.CreatePlot'''(''PlotType'', ''UserSettings'', ''Width'', ''Height'')


Parameters
===Parameters===
:''PlotType'': The plot type, specified with the [[WAPlotType Enumeration|WAPlotType]] enumeration.
''PlotType''
:Required. The type of plot to create. Can be any [[WAPlotType Enumeration|WAPlotType]] constant.


:''UserSettings'': The plot settings, specified as a [[WAPlotSettings Class|WAPlotSettings]] object.
''UserSettings''
:Optional. The [[WAPlotSettings Class|WAPlotSettings ]] object that represents the plot's settings.  


:''Width'': The width, in pixels, of the finished plot.
''Width''
:Optional. Integer. The plot width. Default value = 1150 pixels.


:''Height'': The height, in pixels, of the finished plot.
''Height''
:Optional. Integer. The plot height. Default value = 800 pixels.


== Usage Example ==
== Example ==
{{APIComment|'Create a new Weibull/ALTA Plot instance. See [[WAPlots.CreatePlot|CreatePlot]].}}
  Dim WeibullALTAPlot As New WAPlots
    
    
  {{APIComment|'Declare a WeibullDataSet. See [[WeibullDataSet Class|WeibullDataSet]].}}
  {{APIComment|'Declare a WeibullDataSet object.}}
   Dim WDS As New WeibullDataSet
   Dim WDS As New WeibullDataSet
    
    
  {{APIComment|'Add values to the raw data. See [[WeibullDataSet.AddFailure|AddFailure]].}}
  {{APIComment|'Add failures to the data set.}}
   WDS.AddFailure(1, 1)
   WDS.AddFailure(1, 1)
   WDS.AddFailure(2, 1)
   WDS.AddFailure(2, 1)
   WDS.AddFailure(3, 1)
   WDS.AddFailure(3, 1)
    
    
  {{APIComment|'Specify that it will be based on the WDS data set.}}
  {{APIComment|'Create a WAPlots object.}}
   WeibullALTAPlot.AddDataset(WDS)
  Dim MyPlot As New WAPlots
{{APIComment|'Add the data set to the plot.}}
   MyPlot.AddDataset(WDS)
   
   
  {{APIComment|'Create a Probability plot and save it as a bitmap file. See [[WAPlotType Enumeration|WAPlotType]] for plot types.}}
  {{APIComment|'Create a Probability plot and save it as a bitmap file.}}
   Dim FinalPlot As Bitmap = WeibullALTAPlot.CreatePlot(WAPlotType.Probability)
   Dim FinalPlot As Bitmap = MyPlot.CreatePlot(WAPlotType.Probability)

Revision as of 23:18, 19 April 2016

APIWiki.png


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

 '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)
 
 'Create a WAPlots object.  
 Dim MyPlot As New WAPlots

 'Add the data set to the plot. 
 MyPlot.AddDataset(WDS)

 'Create a Probability plot and save it as a bitmap file. 
 Dim FinalPlot As Bitmap = MyPlot.CreatePlot(WAPlotType.Probability)