def text(self, x, y, s, *args, **kwargs): """ Call signature:: figtext(x, y, s, fontdict=None, **kwargs) Add text to figure at location *x*, *y* (relative 0-1 coords). See :func:`~matplotlib.pyplot.text` for the meaning of the other arguments. kwargs control the :class:`~matplotlib.text.Text` properties: %(Text)s """ override = _process_text_args({}, *args, **kwargs) t = Text( x=x, y=y, text=s, ) t.update(override) self._set_artist_props(t) self.texts.append(t) return t
def text(self, x, y, s, *args, **kwargs): """ Add text to figure. Call signature:: text(x, y, s, fontdict=None, **kwargs) Add text to figure at location *x*, *y* (relative 0-1 coords). See :func:`~matplotlib.pyplot.text` for the meaning of the other arguments. kwargs control the :class:`~matplotlib.text.Text` properties: %(Text)s """ override = _process_text_args({}, *args, **kwargs) t = Text( x=x, y=y, text=s, ) t.update(override) self._set_artist_props(t) self.texts.append(t) return t
def text(self, x, y, s, *args, **kwargs): """ Add text to figure at location x,y (relative 0-1 coords) See the help for Axis text for the meaning of the other arguments """ override = _process_text_args({}, *args, **kwargs) t = Text(x=x, y=y, text=s) t.update(override) self._set_artist_props(t) self.texts.append(t) return t
def text(self, x, y, s, *args, **kwargs): """ Add text to figure at location x,y (relative 0-1 coords) See the help for Axis text for the meaning of the other arguments """ override = _process_text_args({}, *args, **kwargs) t = Text( x=x, y=y, text=s, ) t.update(override) self._set_artist_props(t) self.texts.append(t) return t
def set_ticklabels(self, ticklabels, *args, **kwargs): """ Set the text values of the tick labels. ticklabels is a sequence of strings. Return a list of Text instances """ ticklabels = [str(l) for l in ticklabels] self.set_major_formatter(FixedFormatter(ticklabels)) override = {} override = _process_text_args(override, *args, **kwargs) ret = [] for i, tick in enumerate(self.get_major_ticks()): if i < len(ticklabels): ret.append(tick.label1) tick.label1.update(override) return ret
def set_ticklabels(self, ticklabels, *args, **kwargs): """ Set the text values of the tick labels. ticklabels is a sequence of strings. Return a list of Text instances """ ticklabels = [str(l) for l in ticklabels] self.set_major_formatter( FixedFormatter(ticklabels) ) override = {} override = _process_text_args(override, *args, **kwargs) ret = [] for i, tick in enumerate(self.get_major_ticks()): if i<len(ticklabels): ret.append(tick.label1) tick.label1.update(override) return ret