graph=newGraph()
layer = graph.activeLayer()
grid = layer.grid()
grid.setMajor(True)
assert grid.xMajor()
assert grid.yMajor()
grid.setXMajor(False)
grid.setYMajor(False)
assert not grid.xMajor()
assert not grid.yMajor()
grid.setMajor(True)
grid.setMinor(True)
assert grid.xMinor()
assert grid.yMinor()
grid.setXMinor(False)
grid.setYMinor(False)
assert not grid.xMinor()
assert not grid.yMinor()
grid.setMinor(True)
grid.setXZeroLine(True)
assert grid.xZeroLine()
grid.setYZeroLine(True)
assert grid.yZeroLine()
pen=grid.xMajorPen()
pen.setColor(Qt.black)
grid.setXMajorPen(pen)
pen=grid.yMajorPen()
pen.setColor(Qt.red)
grid.setYMajorPen(pen)
pen=grid.xMinorPen()
pen.setColor(Qt.green)
grid.setXMinorPen(pen)
pen=grid.yMinorPen()
pen.setColor(Qt.blue)
grid.setYMinorPen(pen)



layer.replot()
graph.exportImage("grid.png")

app.exit()
