# -*- coding: utf-8 -*-
"""
Created on Mon Mar 23 15:25:15 2015

@author: pc-prova2
"""

import numpy as np
import matplotlib.pyplot as plt
from matplotlib.patches import Arc

z = 1.0 # scale factor
L = 7.0     # size of the external frame
s = 0.0   # free space around diagram
lw = 1.0    # line width

r = 1.0 / 3.9  # radius of 1, 2, 3 circles
d = 2*r        # diameter of main circles
w = 0.38       # space for 2/1 mode
d4 = d * (1+w)
d5 = d * (1-w)

c1x = r;     c1y = 1.25*r
c2x = 1.8*r; c2y = 2.1*r
c3x = 2.1*r; c3y = r
c6x = c3x + r; c6y = c3y 
c7x = c3x - r; c7y = c3y 
d6 = d * w

fig = plt.figure(figsize=(7.0, 7.0))
ax = fig.add_subplot(1,1,1)

circle1 = Arc([c1x, c1y], d, d, 0, 0, 360, color='r', linewidth=lw)
ax.add_patch(circle1)

circle2 = Arc([c2x, c2y], d, d, 0, 0, 360, color='b', linewidth=lw)
ax.add_patch(circle2)

circle3 = Arc([c3x, c3y], d, d, 0, 0, 360, color='g', linewidth=lw)
ax.add_patch(circle3)

circle4 = Arc([c3x, c3y], d4, d4, 0, 0, 180, color='k', linewidth=lw)
ax.add_patch(circle4)

circle5 = Arc([c3x, c3y], d5, d5, 0, 0, 180, color='k', linewidth=lw)
ax.add_patch(circle5)

circle6 = Arc([c6x, c6y], d6, d6, 0, 180, 360, color='k', linewidth=lw)
ax.add_patch(circle6)

circle7 = Arc([c7x, c7y], d6, d6, 0, 180, 360, color='k', linewidth=lw)
ax.add_patch(circle7)

plt.show()