def add_text ( text , x = 0.01 , y = 0.01 , axes = "gca" , draw = True , * * kwargs ) : if axes == "gca" : axes = _pylab . gca ( ) axes . text ( x , y , text , transform = axes . transAxes , * * kwargs ) if draw : _pylab . draw ( )
how to place text in a matplotlib plot in python without knowing scales
Adds text to the axes at the specified position .
def add_text(text, x=0.01, y=0.01, axes="gca", draw=True, **kwargs):
    """
    Adds text to the axes at the specified position.

    **kwargs go to the axes.text() function.
    """
    if axes=="gca": axes = _pylab.gca()
    axes.text(x, y, text, transform=axes.transAxes, **kwargs)
    if draw: _pylab.draw()