def offset_copy(trans, fig=None, x=0.0, y=0.0, units=u'inches'):
 if (units == u'dots'):
  return (trans + Affine2D().translate(x, y))
 if (fig is None):
  raise ValueError(u'For units of inches or points a fig kwarg is needed')
 if (units == u'points'):
  x /= 72.0
  y /= 72.0
 elif (not (units == u'inches')):
  raise ValueError(u'units must be dots, points, or inches')
 return (trans + ScaledTranslation(x, y, fig.dpi_scale_trans))

def offset_copy ( trans , fig = None , x = 0.0 , y = 0.0 , units = u'inches' ) : if ( units == u'dots' ) : return ( trans + Affine2D ( ) . translate ( x , y ) ) if ( fig is None ) : raise ValueError ( u'For units of inches or points a fig kwarg is needed' ) if ( units == u'points' ) : x /= 72.0 y /= 72.0 elif ( not ( units == u'inches' ) ) : raise ValueError ( u'units must be dots, points, or inches' ) return ( trans + ScaledTranslation ( x , y , fig . dpi_scale_trans ) )
return a new transform with an added offset .