def plot_circle_data1(offset):
    (center_circle, ring_touching, ring_near, ring_far,
     near_distance, far_distance, angles) = circle_data1(offset)

    def get_params(obj):
        x, y = obj.cshape.center 
        return obj.name, x, y, obj.cshape.r
    
    import pylab
    fig = pylab.figure(figsize=(6.0, 6.0)) #size in inches
    fig.suptitle('circle_data1', fontsize=12)
    pylab.axes().set_aspect('equal') # aspect ratio

    name, x, y, r = get_params(center_circle)
    cir = pylab.Circle((x,y), radius=r,  ec='black', fc='none')
    pylab.gca().add_patch(cir)
    xmax = r

    for ring, color in [ (ring_touching, 'r'), (ring_near, 'g'),
                         (ring_far, 'b') ]:
        for obj in ring:
            name, x, y, r = get_params(obj)
            cir = pylab.Circle((x,y), radius=r,  ec=color, fc='none')
            pylab.gca().add_patch(cir)
    ymin = -(xmax + (2*r + far_distance)*3)
    xmax = xmax + (2*r + far_distance)*2

    # axis: xmin, xmax, ymin, ymax
    pylab.axis([-xmax, xmax, ymin, xmax])

    # make legends
    labels = ['center_circle', 'overlapping ring', 'near ring', 'far ring']
    colors = ['black', 'r', 'g', 'b' ]
    dummys = [ pylab.Line2D([0,1], [0,1], lw=2.0, c=e) for e in colors]
    pylab.gca().legend(dummys, labels, ncol=2, loc='lower center')

    #pylab.show()
    pylab.savefig('circle1_data.png')
dataset/ETHPy150Open los-cocos/cocos/utest/test_collision_model.py/plot_circle_data1/original