'Calculates the bounds based on the current temperatures
Rules:
* Include the full extruder0 history
* Include the current target temp (but not necessarily old
settings)
* Include the extruder1 and/or bed temp if
1) The target temp is >0
2) The history has ever been above 5
* Include at least min_scale
* Include at least buffer above & below the extreme temps'

def getBounds(self):

    extruder0_min = min(self.graph.extruder0temps)
    extruder0_max = max(self.graph.extruder0temps)
    extruder0_target = self.graph.extruder0targettemps[(-1)]
    extruder1_min = min(self.graph.extruder1temps)
    extruder1_max = max(self.graph.extruder1temps)
    extruder1_target = self.graph.extruder1targettemps[(-1)]
    bed_min = min(self.graph.bedtemps)
    bed_max = max(self.graph.bedtemps)
    bed_target = self.graph.bedtargettemps[(-1)]
    miny = min(extruder0_min, extruder0_target)
    maxy = max(extruder0_max, extruder0_target)
    if ((extruder1_target > 0) or (extruder1_max > 5)):
        miny = min(miny, extruder1_min, extruder1_target)
        maxy = max(maxy, extruder1_max, extruder1_target)
    if ((bed_target > 0) or (bed_max > 5)):
        miny = min(miny, bed_min, bed_target)
        maxy = max(maxy, bed_max, bed_target)
    miny = min(0, miny)
    maxy = max(260, maxy)
    padding = (((maxy - miny) * self.buffer) / (1.0 - (2 * self.buffer)))
    miny -= padding
    maxy += padding
    if ((maxy - miny) < self.min_scale):
        extrapadding = (((self.min_scale - maxy) + miny) / 2.0)
        miny -= extrapadding
        maxy += extrapadding
    return (miny, maxy)
