|
import matplotlib.pyplot as plt |
|
import matplotlib.patches as patches |
|
|
|
|
|
quotient = (65000000 / 44414)/1 |
|
ht_quotient = (65000000 / 9249)/1 |
|
|
|
|
|
grey_circle_size = 20000 |
|
pink_circle_size = grey_circle_size/quotient |
|
|
|
|
|
fig, ax = plt.subplots(figsize=(20, 20)) |
|
|
|
|
|
grey_radius = grey_circle_size**0.5 / 500 |
|
grey_circle = plt.Circle((0.3, 0.5), radius=grey_radius, color="grey", ec="black", lw=2, alpha=0.3) |
|
ax.add_patch(grey_circle) |
|
|
|
|
|
red_blue_circle_radius = (grey_circle_size / ht_quotient)**0.5 / 500 |
|
|
|
|
|
red_blue_circle_center_x = 0.25 + grey_radius - red_blue_circle_radius |
|
|
|
|
|
red_half_circle = patches.Wedge((red_blue_circle_center_x, 0.5), red_blue_circle_radius, 90, 270, color="#de8a8a", ec="black", lw=1) |
|
blue_half_circle = patches.Wedge((red_blue_circle_center_x, 0.5), red_blue_circle_radius, 270, 90, color="#6ea4da", ec="black", lw=1) |
|
|
|
|
|
ax.add_patch(red_half_circle) |
|
ax.add_patch(blue_half_circle) |
|
|
|
|
|
pink_circle = plt.Circle((0.6, 0.5), radius=pink_circle_size**0.5 / 500, color="mediumpurple", ec="black", lw=2, alpha=0.7) |
|
ax.add_patch(pink_circle) |
|
|
|
|
|
ax.set_aspect('equal') |
|
ax.set_xlim(0, 1) |
|
ax.set_ylim(0, 1) |
|
ax.axis('off') |
|
plt.tight_layout() |
|
plt.savefig('circles.png', dpi=300) |
|
plt.show() |