def __init__(self, x, y, text, offset=(0, 0), **kwargs): """Initialize an instance of `TextCollection`. This class encompasses drawing a collection of text values at a variety of locations. Parameters ---------- x : array_like The x locations, in data coordinates, for the text y : array_like The y locations, in data coordinates, for the text text : array_like of str The string values to draw offset : (int, int) The offset x and y, in normalized coordinates, to draw the text relative to the data locations. kwargs : arbitrary keywords arguments """ Text.__init__(self, **kwargs) self.x = x self.y = y self.text = text self.offset = offset
def __init__(self, x, y, text, offset=(0, 0), **kwargs): """Initialize an instance of `TextCollection`. This class encompasses drawing a collection of text values at a variety of locations. Parameters ---------- x : array_like The x locations, in data coordinates, for the text y : array_like The y locations, in data coordinates, for the text text : array_like of str The string values to draw offset : (int, int) The offset x and y, in normalized coordinates, to draw the text relative to the data locations. kwargs : arbitrary keywords arguments """ Text.__init__(self, **kwargs) self.x = x self.y = y self.text = text self.offset = offset if not hasattr(self, '_usetex'): # Only needed for matplotlib 1.4 compatibility self._usetex = None
def __init__(self, x, y, text, offset=(0, 0), **kwargs): Text.__init__(self, **kwargs) self.x = x self.y = y self.text = text self.offset = offset if not hasattr(self, '_usetex'): # Only needed for matplotlib 1.4 compatibility self._usetex = None
def __init__(self, x, y, text, offset=(0, 0), **kwargs): Text.__init__(self, **kwargs) self.x = x self.y = y self.text = text self.offset = offset if not hasattr( self, '_usetex'): # Only needed for matplotlib 1.4 compatibility self._usetex = None
def __init__(self, axes, on_dblclick, *args, **kwargs): Text.__init__(self, *args, **kwargs) self.axes = axes self.axes.add_artist(self) self.connections = [ axes.figure.canvas.mpl_connect('button_press_event', self.onclick), axes.figure.canvas.mpl_connect('button_release_event', self.onrelease), axes.figure.canvas.mpl_connect('motion_notify_event', self.onmove), ] self.press = None self.on_dblclick = on_dblclick