def plot(xy, sv, x0, y0, R0, center, R):
    import pylab
    pylab.plot(xy[:, 0], xy[:, 1], 'k+')
    pylab.plot(xy[sv, 0], xy[sv, 1], 'bx', mfc="None")
    pylab.plot([x0], [y0], 'ro')
    pylab.plot([center[0]], [center[1]], 'bo')
    pylab.plot([xy[sv[0], 0], center[0]], [xy[sv[0], 1], center[1]], 'b--')
    c = circle(x0, y0, R0)
    pylab.plot(c[:, 0], c[:, 1], 'r-', linewidth=2)
    c = circle(center[0], center[1], R)
    pylab.plot(c[:, 0], c[:, 1], 'b-', linewidth=2)
    pylab.axis('equal')
    pylab.show()
Ejemplo n.º 2
0
def plot(xy, sv, x0, y0, R0, center, R):
    import pylab
    pylab.plot(xy[:,0],xy[:,1],'k+')
    pylab.plot(xy[sv,0],xy[sv,1],'bx',mfc="None")
    pylab.plot([x0],[y0],'ro')
    pylab.plot([center[0]],[center[1]],'bo')
    pylab.plot([xy[sv[0],0], center[0]],[xy[sv[0],1], center[1]],'b--')
    c = circle(x0,y0,R0)
    pylab.plot(c[:,0], c[:,1], 'r-', linewidth=2)
    c = circle(center[0],center[1],R)
    pylab.plot(c[:,0], c[:,1], 'b-', linewidth=2)
    pylab.axis('equal')
    pylab.show()