|
ecGraph Demo11. Multiple x- and y-axes.
- Multiple x- and y-axes.
- Scroll down below the screenshot image to see the VB code that
was used to generate the graph.
The VB code used to generate the above graph...
Public Sub Demo11(ecGraph1 As ecGraph) 'Multiple x- and y-axes Dim
i, X As Double, Y As
Double With ecGraph1
Call .Reset
'Always call "Reset" first
Call
.NewGraph("Multiple x- and y-axes") 'Start a new graph on the page
Call
.AxisTitleStyle("First x-axis", , , 0)
Call
.BorderStyle(ecPurple, ecAliceDarkBlue, 90)
Call
.PlotAreaColors(ecBrown, ecAliceDarkBlue, 0)
Call
.BorderStyle(, , , , , , 33, 6, 6, 32)
Call
.LegendTableStyle(, , 70, 52, , , 14408703, 14408703)
Call
.SelectYaxis Call .AxisTitleStyle("First x-axis", , , 0)
Call
.NewDataSet("First axis Data") 'Start a new data set on the graph
For i = 1
To 18 'Add some data
points to the graph X
= 100 + i Y = 100 + Sqr(i) +
2 * Rnd Call .AddDataPoint(X, Y)
Next i
Call .NewXAxis("Second
x-Axis") Call .NewYAxis("Second
y-Axis") Call .NewDataSet("Second
axis Data") 'Start a new data set on the
graph For i = 1 To 18
'Add some data points to the graph
X = 50 + i
Y = 80 + Sqr(i) + 2 * Rnd
Call .AddDataPoint(X, Y)
Next i
Call .NewXAxis("Third
x-Axis") Call .NewYAxis("Third
y-Axis") Call .NewDataSet("Third
axis Data") 'Start a new data set on the
graph For i = 1 To 18
'Add some data points to the graph
X = 10 + i
Y = 60 + Sqr(i) + 2 * Rnd
Call .AddDataPoint(X, Y)
Next i
Call .Refresh 'Always end
with "Refresh" End With End Sub
Copyright © 2007,
Encore Consulting Pty Ltd.
www.encoreconsulting.com.au
|