def test_stereo(azimuths, takeoffs, polarities, sdr=[]):
    """
	Plots points with given azimuths, takeoff angles, and 
	polarities on a stereonet. Will also plot both planes
	of a double-couple given a strike/dip/rake
    """
    import matplotlib.pyplot as plt
    import mplstereonet
    from obspy.imaging.beachball import aux_plane
    print('azimuths:')
    print(azimuths)
    print('takeoffs:')
    print(takeoffs)
    print('polarities:')
    print(polarities)
    fig = plt.figure()
    ax = fig.add_subplot(111, projection='stereonet')
    up = polarities > 0
    dn = polarities < 0
    h_rk = ax.rake(azimuths[up] - 90.0 + 180.0, 90.0 - takeoffs[up], 90, 'ro')
    h_rk = ax.rake(azimuths[dn] - 90.0 + 180.0, 90.0 - takeoffs[dn], 90, 'b+')
    print('HERE we ARE')
    if sdr:
        s2, d2, r2 = aux_plane(*sdr)
        h_rk = ax.plane(sdr[0], sdr[1], 'g')
        h_rk = ax.rake(sdr[0], sdr[1], -sdr[2], 'go')
        h_rk = ax.plane(s2, d2, 'g')
        plt.show()
