'Set the visible X range of the view to [*min*, *max*].
The *padding* argument causes the range to be set larger by the fraction specified.
(by default, this value is between 0.02 and 0.1 depending on the size of the ViewBox)'

def setXRange(self, min, max, padding=None, update=True):

    self.setRange(xRange=[min, max], update=update, padding=padding)
