def __init__(self, s, xyz, *args, **kwargs): Annotation.__init__(self, "", xy=(0, 0), bbox=dict(boxstyle="round,pad=0.3", fc="whitesmoke", ec="lightgray", lw=2), *args, **kwargs) self._verts3d = xyz self.s = s
def __init__(self, s, xyz, *args, **kwargs): Annotation.__init__(self,s, xy=(0,0), *args, **kwargs) self._verts3d = xyz
def __init__(self, s, xyz, text_offset=[0,0,0],*args, **kwargs): Annotation.__init__(self,s, xy=(0,0), *args, **kwargs) self._verts3d = xyz + text_offset self._offset = text_offset
def __init__(self, direction, s_list, xy_list, refpos, xycoords='data', refcoord='data', arrowprops=None, annotation_clip=None, pad=0.15, patches=None, connection_style_func=DefaultConnectionStyleFunc(), **kwargs): if direction not in self._default_values.keys(): raise ValueError("direction must be one of %s" + ",".join(self._default_values.keys())) self._direction = direction default_values=self._default_values[direction] INDX = default_values["INDX"] if not ("va" in kwargs or "verticalalignment" in kwargs): kwargs["va"] = default_values["va"] if not ("ha" in kwargs or "horizontalalignment" in kwargs): kwargs["ha"] = default_values["ha"] if not "rotation" in kwargs: kwargs["rotation"] = default_values["rot"] if refcoord not in ["data", "axes fraction", "figure fraction"]: raise ValueError("") self._s_list = s_list self._xy_list = xy_list self._pad = pad xytext = [0, 0] xytext[INDX] = refpos textcoords = ["figure pixels", "figure pixels"] textcoords[INDX] = refcoord self._INDX = INDX self.arrowprops = arrowprops self.arrow = None if arrowprops is None: arrowprops = dict(arrowstyle="-", relpos=default_values["relpos"]) elif arrowprops.has_key("arrowstyle") and "relpos" not in arrowprops: arrowprops["relpos"] = default_values["relpos"] self._connection_style_func = connection_style_func Annotation.__init__(self, "", (0,0), xytext=xytext, xycoords=xycoords, textcoords=tuple(textcoords), arrowprops=arrowprops, annotation_clip=annotation_clip, **kwargs)