EcGraph Demo11.   Multiple x- and y-axes.


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