(artist)
return xy
Attempts to get the x,y data for individual items subitems of the artist.
    Returns None if this is not possible.

    At present, this only supports Line2D's and basic collections.
Attempts to get the x,y data for individual items subitems of the artist.
    Returns None if this is not possible.
Attempts to get the x y data for individual items subitems of the artist . Returns None if this is not possible .
def get_xy(artist):
    """
    Attempts to get the x,y data for individual items subitems of the artist.
    Returns None if this is not possible.

    At present, this only supports Line2D's and basic collections.
    """
    xy = None

    if hasattr(artist, 'get_offsets'):
        xy = artist.get_offsets().T
    elif hasattr(artist, 'get_xydata'):
        xy = artist.get_xydata().T

    return xy
def get_xy ( artist ) : xy = None if hasattr ( artist , 'get_offsets' ) : xy = artist . get_offsets ( ) . T elif hasattr ( artist , 'get_xydata' ) : xy = artist . get_xydata ( ) . T return xy