Sub Main
    Dim GrapherApp As Object
    Set GrapherApp = CreateObject("Grapher.Application")
    GrapherApp.Visible = True

    'Create a new plot window
    Set Plot1 = GrapherApp.Documents.Add(grfPlotDoc)

    'Create a rectangle
    Set Rectangle1 = Plot1.Shapes.AddRectangle(2,5,5,7)

    'Set the Fill pattern and foreground color
    Rectangle1.Fill.SetPattern("Solid")
    Rectangle1.Fill.foreColor = grfColorBlue
End Sub
