#NEWLINE# def __init__( self , ax , x , y1 , y2 , y3 , width = 0.015 , fc = 'k' , fill = False , zorder = 2 ) : #NEWLINE# #INDENT# '\n        Chromosome with centromeres at y2 position\n        ' #NEWLINE# pts = [ ] #NEWLINE# r = ( width * 0.5 ) #NEWLINE# pts += plot_cap ( ( x , ( y1 - r ) ) , np . radians ( range ( 180 ) ) , r ) #NEWLINE# pts += [ [ ( x - r ) , ( y1 - r ) ] , [ ( x - r ) , ( y2 + r ) ] ] #NEWLINE# pts += plot_cap ( ( x , ( y2 + r ) ) , np . radians ( range ( 180 , 360 ) ) , r ) #NEWLINE# pts += [ [ ( x + r ) , ( y2 + r ) ] , [ ( x + r ) , ( y1 - r ) ] ] #NEWLINE# ax . add_patch ( Polygon ( pts , fc = fc , fill = fill , zorder = zorder ) ) #NEWLINE# pts = [ ] #NEWLINE# pts += plot_cap ( ( x , ( y2 - r ) ) , np . radians ( range ( 180 ) ) , r ) #NEWLINE# pts += [ [ ( x - r ) , ( y2 - r ) ] , [ ( x - r ) , ( y3 + r ) ] ] #NEWLINE# pts += plot_cap ( ( x , ( y3 + r ) ) , np . radians ( range ( 180 , 360 ) ) , r ) #NEWLINE# pts += [ [ ( x + r ) , ( y3 + r ) ] , [ ( x + x ) , ( y2 - r ) ] ] #NEWLINE# ax . add_patch ( Polygon ( pts , fc = fc , fill = fill , zorder = zorder ) ) #NEWLINE# ax . add_patch ( CirclePolygon ( ( x , y2 ) , radius = ( r * 0.5 ) , fc = 'k' , ec = 'k' , zorder = zorder ) )