canvas = iface.mapCanvas()
polyline = QgsRubberBand(canvas, False) # False = not a polygon
points = [QgsPoint(1,1), QgsPoint(2,2), QgsPoint(3,3), QgsPoint(4,4)]
polyline.setToGeometry(QgsGeometry.fromPolyline(points), None)
polyline.setColor(QColor(255, 0, 0))
polyline.setWidth(3)
This is my sample code. I want to be able to append points to the line rather than updating my list and providing the same list again. Is there any way to do so?