#NEWLINE# def add_annotation( self , annotation , **kwargs ) : #NEWLINE# #INDENT# 'Adds new Annotation into the Plot.renderers\n\n        Args:\n            annotation (Annotation) : instance of annotation to add to plot\n        Returns:\n            Annotation\n\n        ' #NEWLINE# if ( not isinstance ( annotation , Annotation ) ) : #NEWLINE# #INDENT# raise ValueError ( "'annotation' argument to add_annotation must be Annotation subclass" ) #NEWLINE# #UNINDENT# if ( annotation . plot is not None ) : #NEWLINE# #INDENT# raise ValueError ( ( "annotation %s to be added already has 'plot' attribute set" % annotation ) ) #NEWLINE# #UNINDENT# annotation . plot = self #NEWLINE# self . renderers . append ( annotation ) #NEWLINE# return annotation