Application.CreateMultipleGraphs
This function takes a set of graphs and combines them onto a single graph.
| Syntax | Parameters | Return Value |
|---|---|---|
Function Application.CreateMultipleGraphs( _
GraphArray As Variant, _
Optional LayoutNumber As Integer = 1, _
Optional HorizontalMargin As Integer = 5, _
Optional VerticalMargin As Integer = 5, _
Optional mode As GraphMappingMode = scIsotropic, _
Optional Title As String = "", _
Optional Subtitle As String = "", _
Optional Footnote As String = "", _
Optional leftHorizontalMargin As Integer = -1, _
Optional topVerticalMargin As Integer = -1) As Object
|
Array of graphs to be inserted into the graph template. Type: Variant Which layout to use for the template. Type: Integer Default value: 1 The horizontal margin. This parameter defaults to 5. Type: Integer Default value: 5 The vertical margin. This parameter defaults to 5. Type: Integer Default value: 5 The graph mapping mode. The following arguments can be used for this parameter:. Type: GraphMappingMode Default value: scIsotropic The text for the template's title. This parameter defaults to a blank string. Type: String Default value: "" The text for the template's subtitle. This parameter defaults to a blank string. Type: String Default value: "" The text for the template's footnote. This parameter defaults to a blank string. Type: String Default value: "" Type: Integer Default value: -1 Type: Integer Default value: -1 |
Object |
SVB Example
Combining multiple graphs:
Option Base 1
Option Explicit
Sub Main
Dim newanalysis As Analysis
Set newanalysis = Analysis (sc2dHistograms, ActiveDataSet)
With newanalysis.Dialog
.Variables = "*"
.GraphType = scHistogramRegularPlot
.FitType = scHistoFitNormal
.ShowingType = scStandard
.BreakBetweenColumns = False
.ShowPercentages = False
.YAxisOption = scLeftNumber
.DisplayDescriptiveStatistics = False
.DisplayKolmogorovSmirnovTest = False
.DisplayShapiroWilkTest = False
.DisplayTotalCount = False
End With
With newanalysis.Dialog.Intervals
.EnableCategory = True
.CategoryType = scIntegerCategory
.AutoCategory = True
End With
With newanalysis.Dialog.CategoryOne
.EnableCategory = False
End With
With newanalysis.Dialog.CategoryTwo
.EnableCategory = False
End With
With newanalysis.Dialog.Options
.DisplayDefaultTitle = True
.TitlePosition = scTitleTop
.Title = ""
.DisplayDefaultFootnote = False
.Footnote = ""
.DisplayCaseLabels = scCaseLabelOff
.CaseLabelsVariable = "1"
.DisplayTextValuesAsAxisValues = True
.CoordinateSystem = scCoordinateStandard
.XYAxisPosition = scAxisStandard
.DisplayFitExpressionInTitle = scFitOptionInTitle
.PolynomialOrder = scQuadraticOrder
.LogBase = scLogOptionTenBase
.DisplayProgressBar = True
.RandomSampling = False
.RandomSamplingSubsetSize = 1
.AxisType(scX) = scLinearScale
.AxisType(scY) = scLinearScale
.AxisType(scZ) = scLinearScale
.AxisType(scV) = scLinearScale
End With
GraphWizardOutput(newanalysis)
End Sub
Sub GraphWizardOutput(GraphAnalysis As Analysis)
Dim GraphArray() As Graph
Dim GraphTemplate As Graph
Dim g As Graph
Dim i As Integer
i = 1
For Each g In GraphAnalysis.Dialog.Graphs
ReDim Preserve GraphArray(i)
Set GraphArray(i) = g
i = i + 1
Next g
Set GraphTemplate = Application.CreateMultipleGraphs(GraphArray(),1,5,5, _
scAnisotropic,"Histogram Output",,)
GraphTemplate.Visible = True
End Sub
