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

"""
Explanation: Let's start off with a square figure.
End of explanation
"""


BOARD_COLOR = '#d7be9f'

fig = plt.figure(figsize=(5, 5), facecolor=BOARD_COLOR)

ax = fig.add_subplot(1, 1, 1)

plt.show()

"""
Explanation: Give it a nice wooden color http://encycolorpedia.com/c19a6b
End of explanation
"""


fig = plt.figure(figsize=(5, 5), facecolor=BOARD_COLOR)
ax = fig.add_subplot(1, 1, 1)

ax.set_axis_bgcolor('none')

plt.show()

"""
Explanation: The default background color for Axes is white. Let's propagate the figure background color by making the axis background color transparent, or 'none'
End of explanation
"""


fig = plt.figure(figsize=(5, 5), facecolor=BOARD_COLOR)
ax = fig.add_subplot(1, 1, 1)

ax.set_axis_bgcolor('none')
ax.set_xticks(range(19))
ax.set_yticks(range(19))

plt.show()

"""
Explanation: Set the ticks to reflect 19 by 19 board
End of explanation
"""


fig = plt.figure(figsize=(5, 5), facecolor=BOARD_COLOR)
ax = fig.add_subplot(1, 1, 1)

ax.set_axis_bgcolor('none')
ax.set_xticks(range(19))
ax.set_yticks(range(19))

ax.grid(color='k', linestyle='-', linewidth=1)

plt.show()

"""
Explanation: Add gridlines
End of explanation
"""


hoshi = list(product(range(3, 19, 6), repeat=2))
hoshi

hoshi_rows, hoshi_cols = zip(*hoshi)
hoshi_rows, hoshi_cols

fig = plt.figure(figsize=(5, 5), facecolor=BOARD_COLOR)
ax = fig.add_subplot(1, 1, 1)

ax.set_axis_bgcolor('none')
ax.set_xticks(range(19))
ax.set_yticks(range(19))

ax.grid(color='k', linestyle='-', linewidth=1)
ax.plot(hoshi_rows, hoshi_cols, 'ko')

plt.show()

"""
Explanation: Generate and plot the hoshi (star) points
End of explanation
"""


fig = plt.figure(figsize=(5, 5), facecolor=BOARD_COLOR)
ax = fig.add_subplot(1, 1, 1)

ax.set_axis_bgcolor('none')
ax.set_xticks(range(19))
ax.set_yticks(range(19))

ax.grid(color='k', linestyle='-', linewidth=1)
ax.plot(hoshi_rows, hoshi_cols, 'ko')

ax.set_xlim((0, 18))
ax.set_ylim((18, 0))

plt.show()

"""
Explanation: Need to set the x and y lims... Go boards are ordinarily read from the top-left.
End of explanation
"""


fig = plt.figure(figsize=(5, 5), facecolor=BOARD_COLOR)
ax = fig.add_subplot(1, 1, 1)

ax.set_axis_bgcolor('none')

ax.set_xticks(range(19))
ax.set_yticks(range(19))

ax.grid(color='k', linestyle='-', linewidth=1)
ax.plot(hoshi_rows, hoshi_cols, 'ko')

ax.set_xlim((0, 18))
ax.set_ylim((18, 0))

ax.xaxis.set_tick_params(labelbottom='off', labeltop='on')

plt.show()

"""
Explanation: The column labels are normally at the top.
End of explanation
"""


ascii_uppercase

fig = plt.figure(figsize=(5, 5), facecolor=BOARD_COLOR)
ax = fig.add_subplot(1, 1, 1)

ax.set_axis_bgcolor('none')

ax.set_xticks(range(19))
ax.set_yticks(range(19))

ax.grid(color='k', linestyle='-', linewidth=1)
ax.plot(hoshi_rows, hoshi_cols, 'ko')

ax.set_xlim((0, 18))
ax.set_ylim((18, 0))

ax.xaxis.set_tick_params(labelbottom='off', labeltop='on')
ax.set_xticklabels(ascii_uppercase[:19])

plt.show()

"""
Explanation: The column labels are often the letters of the alphabet, and not just in the Western world of Go. Otherwise, Chinese characters representing the numbers are sometimes used as well, but along the rows.
End of explanation
"""


fig = plt.figure(figsize=(5, 5), facecolor=BOARD_COLOR)
ax = fig.add_subplot(1, 1, 1)

ax.set_axis_bgcolor('none')

ax.set_xticks(range(19))
ax.set_yticks(range(19))

ax.grid(color='k', linestyle='-', linewidth=1)
ax.plot(hoshi_rows, hoshi_cols, 'ko', markersize=3)

ax.set_xlim((0, 18))
ax.set_ylim((18, 0))

ax.xaxis.set_tick_params(labelbottom='off', labeltop='on')
ax.set_xticklabels(ascii_uppercase[:19])
ax.set_yticklabels(range(1, 19+1))

plt.show()

"""
Explanation: The hoshi are massive... Let's make them smaller by setting markersize for now. I don't think this will scale with figsize, so well need to revisit this later. Patches apparently do scale.
End of explanation
"""


fig = plt.figure(figsize=(5, 5), facecolor=BOARD_COLOR)
ax = fig.add_subplot(1, 1, 1)

ax.set_axis_bgcolor('none')

ax.set_xticks(range(19))
ax.set_yticks(range(19))

ax.grid(color='k', linestyle='-', linewidth=1)
ax.plot(hoshi_rows, hoshi_cols, 'ko', markersize=3)

ax.set_xlim((0, 18))
ax.set_ylim((18, 0))

ax.xaxis.set_tick_params(labelbottom='off', labeltop='on')

ax.set_xticklabels(ascii_uppercase[:19])
ax.set_yticklabels(range(1, 19+1))

ax.add_patch(Circle((9, 9), .475, facecolor='k'))

ax.add_patch(Circle((9, 10), .475, facecolor='w'))
ax.add_patch(Circle((8, 9), .475, facecolor='w'))
ax.add_patch(Circle((9, 8), .475, facecolor='w'))

plt.show()

"""
Explanation: The stones!
End of explanation
"""


fig = plt.figure(figsize=(5, 5), facecolor=BOARD_COLOR)
ax = fig.add_subplot(1, 1, 1)

ax.set_axis_bgcolor('none')

ax.set_xticks(range(19))
ax.set_yticks(range(19))

ax.grid(color='k', linestyle='-', linewidth=1)
ax.plot(hoshi_rows, hoshi_cols, 'ko', markersize=3)

ax.set_xlim((0, 18))
ax.set_ylim((18, 0))

ax.xaxis.set_tick_params(labelbottom='off', labeltop='on')

ax.set_xticklabels(ascii_uppercase[:19])
ax.set_yticklabels(range(1, 19+1))

ax.add_patch(Circle((9, 9), .475, facecolor='k', zorder=10))

ax.add_patch(Circle((9, 10), .475, facecolor='w', zorder=10))
ax.add_patch(Circle((8, 9), .475, facecolor='w', zorder=10))
ax.add_patch(Circle((9, 8), .475, facecolor='w', zorder=10))

plt.show()

"""
Explanation: The white stones seem to be transparent, but this is not the issue. It has to do with the order the elements are drawn: http://stackoverflow.com/questions/5390699/patches-i-add-to-my-graph-are-not-opaque-with-alpha-1-why
End of explanation
"""


fig = plt.figure(figsize=(10, 10), facecolor=BOARD_COLOR)
ax = fig.add_subplot(1, 1, 1)

ax.set_axis_bgcolor('none')

ax.set_xticks(range(19))
ax.set_yticks(range(19))

ax.grid(color='k', linestyle='-', linewidth=1)
ax.plot(hoshi_rows, hoshi_cols, 'ko', markersize=3)

ax.set_xlim((0, 18))
ax.set_ylim((18, 0))

ax.xaxis.set_tick_params(labelbottom='off', labeltop='on')

ax.set_xticklabels(ascii_uppercase[:19])
ax.set_yticklabels(range(1, 19+1))

ax.add_patch(Circle((9, 9), .475, facecolor='k', zorder=10))

ax.add_patch(Circle((9, 10), .475, facecolor='w', zorder=10))
ax.add_patch(Circle((9, 8), .475, facecolor='w', zorder=10))
ax.add_patch(Circle((8, 9), .475, facecolor='w', zorder=10))

plt.show()

"""
Explanation: Let's enlarge it to make sure everything scales well. This confirms our earlier suspicion that ordinary markers do not scale, and patches do.
End of explanation
"""


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

ax.set_axis_bgcolor('none')

ax.set_xticks(range(19))
ax.set_yticks(range(19))

ax.grid(color='k', linestyle='-', linewidth=1)
ax.plot(hoshi_rows, hoshi_cols, 'ko', markersize=3)

ax.set_xlim((0, 18))
ax.set_ylim((18, 0))

ax.xaxis.set_tick_params(labelbottom='off', labeltop='on')

ax.set_xticklabels(ascii_uppercase[:19])
ax.set_yticklabels(range(1, 19+1))

ax.add_patch(Circle((9, 9), .475, facecolor='k', zorder=10))

ax.add_patch(Circle((9, 10), .475, facecolor='w', zorder=10))
ax.add_patch(Circle((9, 8), .475, facecolor='w', zorder=10))
ax.add_patch(Circle((8, 9), .475, facecolor='w', zorder=10))

plt.show()

"""
Explanation: For Print Publication
End of explanation
"""


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

ax.set_axis_bgcolor('none')

for spine in ax.spines.itervalues():
    spine.set_linewidth(1.5)

ax.set_xticks(range(19))
ax.set_yticks(range(19))

ax.grid(color='k', linestyle='-', linewidth=1)
ax.plot(hoshi_rows, hoshi_cols, 'ko', markersize=3)

ax.set_xlim((0, 18))
ax.set_ylim((18, 0))

ax.xaxis.set_tick_params(labelbottom='off', labeltop='on')

ax.set_xticklabels(ascii_uppercase[:19])
ax.set_yticklabels(range(1, 19+1))

ax.add_patch(Circle((9, 9), .475, facecolor='k', zorder=10))

ax.add_patch(Circle((9, 10), .475, facecolor='w', zorder=10))
ax.add_patch(Circle((9, 8), .475, facecolor='w', zorder=10))
ax.add_patch(Circle((8, 9), .475, facecolor='w', zorder=10))

plt.show()

"""
Explanation: Print publications normally have a thicker border.
End of explanation
"""


fig = plt.figure(figsize=(5, 5), facecolor=BOARD_COLOR)
ax = fig.add_subplot(1, 1, 1)

ax.set_axis_bgcolor('none')

ax.set_xticks(range(19))
ax.set_yticks(range(19))

ax.grid(color='k', linestyle='-', linewidth=1)
ax.plot(hoshi_rows, hoshi_cols, 'ko', markersize=3)

ax.set_xlim((0, 18))
ax.set_ylim((18, 0))

ax.xaxis.set_tick_params(labelbottom='off', labeltop='on')

ax.set_xticklabels(ascii_uppercase[:19])
ax.set_yticklabels(range(1, 19+1))

ax.add_patch(Circle((9, 9), .475, facecolor='k', zorder=10))

ax.add_patch(Circle((9, 10), .475, facecolor='w', zorder=10))
ax.add_patch(Circle((9, 8), .475, facecolor='w', zorder=10))
ax.add_patch(Circle((8, 9), .475, facecolor='w', zorder=10))

fig.savefig('test_color1.png')

"""
Explanation: Saving/Exporting
Let's try saving some of our figures.
End of explanation
"""


fig = plt.figure(figsize=(5, 5), facecolor=BOARD_COLOR)
ax = fig.add_subplot(1, 1, 1)

ax.set_axis_bgcolor('none')

ax.set_xticks(range(19))
ax.set_yticks(range(19))

ax.grid(color='k', linestyle='-', linewidth=1)
ax.plot(hoshi_rows, hoshi_cols, 'ko', markersize=3)

ax.set_xlim((0, 18))
ax.set_ylim((18, 0))

ax.xaxis.set_tick_params(labelbottom='off', labeltop='on')

ax.set_xticklabels(ascii_uppercase[:19])
ax.set_yticklabels(range(1, 19+1))

ax.add_patch(Circle((9, 9), .475, facecolor='k', zorder=10))

ax.add_patch(Circle((9, 10), .475, facecolor='w', zorder=10))
ax.add_patch(Circle((9, 8), .475, facecolor='w', zorder=10))
ax.add_patch(Circle((8, 9), .475, facecolor='w', zorder=10))

fig.savefig('test_color2.png', facecolor=fig.get_facecolor())

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

ax.set_axis_bgcolor('none')

for spine in ax.spines.itervalues():
    spine.set_linewidth(1.5)

ax.set_xticks(range(19))
ax.set_yticks(range(19))

ax.grid(color='k', linestyle='-', linewidth=1)
ax.plot(hoshi_rows, hoshi_cols, 'ko', markersize=3)

ax.set_xlim((0, 18))
ax.set_ylim((18, 0))

ax.xaxis.set_tick_params(labelbottom='off', labeltop='on')

ax.set_xticklabels(ascii_uppercase[:19])
ax.set_yticklabels(range(1, 19+1))

ax.add_patch(Circle((9, 9), .475, facecolor='k', zorder=10))

ax.add_patch(Circle((9, 10), .475, facecolor='w', zorder=10))
ax.add_patch(Circle((9, 8), .475, facecolor='w', zorder=10))
ax.add_patch(Circle((8, 9), .475, facecolor='w', zorder=10))

fig.savefig('test_bw.png')

"""
Explanation: http://stackoverflow.com/questions/4804005/matplotlib-figure-facecolor-background-color
End of explanation
"""


fig = plt.figure(figsize=(5, 5), facecolor=BOARD_COLOR)
ax = fig.add_subplot(1, 1, 1)

ax.set_axis_bgcolor('none')

ax.set_xticks(range(19))
ax.set_yticks(range(19))

ax.grid(color='k', linestyle='-', linewidth=1)
ax.plot(hoshi_rows, hoshi_cols, 'ko', markersize=3)

ax.set_xlim((0, 18))
ax.set_ylim((18, 0))

ax.xaxis.set_tick_params(labelbottom='off', labeltop='on')

ax.set_xticklabels(ascii_uppercase[:19])
ax.set_yticklabels(range(1, 19+1))

ax.add_patch(Circle((9, 9), .475, facecolor='k', zorder=10))

ax.add_patch(Circle((9, 10), .475, facecolor='w', zorder=10))
ax.add_patch(Circle((8, 9), .475, facecolor='w', zorder=10))
ax.add_patch(Circle((9, 8), .475, facecolor='w', zorder=10))

ax.text(15, 13, 'a')
ax.text(8, 9, 'b')
ax.text(9, 9, 'c', horizontalalignment='center', verticalalignment='center')

plt.show()

fig = plt.figure(figsize=(5, 5), facecolor=BOARD_COLOR)
ax = fig.add_subplot(1, 1, 1)

ax.set_axis_bgcolor('none')

ax.set_xticks(range(19))
ax.set_yticks(range(19))

ax.grid(color='k', linestyle='-', linewidth=1)
ax.plot(hoshi_rows, hoshi_cols, 'ko', markersize=3)

ax.set_xlim((0, 18))
ax.set_ylim((18, 0))

ax.xaxis.set_tick_params(labelbottom='off', labeltop='on')

ax.set_xticklabels(ascii_uppercase[:19])
ax.set_yticklabels(range(1, 19+1))

ax.add_patch(Circle((9, 9), .475, facecolor='k', zorder=2))

ax.add_patch(Circle((9, 10), .475, facecolor='w', zorder=2))
ax.add_patch(Circle((8, 9), .475, facecolor='w', zorder=2))
ax.add_patch(Circle((9, 8), .475, facecolor='w', zorder=2))

ax.text(15, 13, 'a')
ax.text(8, 9, 'b')
ax.text(9, 9, 'c', horizontalalignment='center', verticalalignment='center')

plt.show()

fig = plt.figure(figsize=(5, 5), facecolor=BOARD_COLOR)
ax = fig.add_subplot(1, 1, 1)

ax.set_axis_bgcolor('none')

ax.set_xticks(range(19))
ax.set_yticks(range(19))

ax.grid(color='k', linestyle='-', linewidth=1)
ax.plot(hoshi_rows, hoshi_cols, 'ko', markersize=3)

ax.set_xlim((0, 18))
ax.set_ylim((18, 0))

ax.xaxis.set_tick_params(labelbottom='off', labeltop='on')

ax.set_xticklabels(ascii_uppercase[:19])
ax.set_yticklabels(range(1, 19+1))

ax.add_patch(Circle((9, 9), .475, facecolor='k', zorder=3))

ax.add_patch(Circle((9, 10), .475, facecolor='w', zorder=3))
ax.add_patch(Circle((8, 9), .475, facecolor='w', zorder=3))
ax.add_patch(Circle((9, 8), .475, facecolor='w', zorder=3))

ax.text(15, 13, 'a')
ax.text(8, 9, 'b')
ax.text(9, 9, 'c', horizontalalignment='center', verticalalignment='center')

plt.show()

fig = plt.figure(figsize=(5, 5), facecolor=BOARD_COLOR)
ax = fig.add_subplot(1, 1, 1)

ax.set_axis_bgcolor('none')

ax.set_xticks(range(19))
ax.set_yticks(range(19))

ax.grid(color='k', linestyle='-', linewidth=1)
ax.plot(hoshi_rows, hoshi_cols, 'ko', markersize=3)

ax.set_xlim((0, 18))
ax.set_ylim((18, 0))

ax.xaxis.set_tick_params(labelbottom='off', labeltop='on')

ax.set_xticklabels(ascii_uppercase[:19])
ax.set_yticklabels(range(1, 19+1))

ax.add_patch(Circle((9, 9), .475, facecolor='k', zorder=3))

ax.add_patch(Circle((9, 10), .475, facecolor='w', zorder=3))
ax.add_patch(Circle((8, 9), .475, facecolor='w', zorder=3))
ax.add_patch(Circle((9, 8), .475, facecolor='w', zorder=3))

ax.text(15, 13, 'a', horizontalalignment='center', verticalalignment='center')
ax.text(8, 9, 'b', horizontalalignment='center', verticalalignment='center')
ax.text(9, 9, 'c', horizontalalignment='center', verticalalignment='center')

plt.show()

fig = plt.figure(figsize=(5, 5), facecolor=BOARD_COLOR)
ax = fig.add_subplot(1, 1, 1)

ax.set_axis_bgcolor('none')

ax.set_xticks(range(19))
ax.set_yticks(range(19))

ax.grid(color='k', linestyle='-', linewidth=1)
ax.plot(hoshi_rows, hoshi_cols, 'ko', markersize=3)

ax.set_xlim((0, 18))
ax.set_ylim((18, 0))

ax.xaxis.set_tick_params(labelbottom='off', labeltop='on')

ax.set_xticklabels(ascii_uppercase[:19])
ax.set_yticklabels(range(1, 19+1))

ax.add_patch(Circle((9, 9), .475, facecolor='k', zorder=3))

ax.add_patch(Circle((9, 10), .475, facecolor='w', zorder=3))
ax.add_patch(Circle((8, 9), .475, facecolor='w', zorder=3))
ax.add_patch(Circle((9, 8), .475, facecolor='w', zorder=3))

ax.text(15, 13, 'a', backgroundcolor=BOARD_COLOR, horizontalalignment='center', verticalalignment='center')
ax.text(8, 9, 'b', horizontalalignment='center', verticalalignment='center')
ax.text(9, 9, 'c', color='w', horizontalalignment='center', verticalalignment='center')

plt.show()

fig = plt.figure(figsize=(5, 5), facecolor=BOARD_COLOR)
ax = fig.add_subplot(1, 1, 1)

ax.set_axis_bgcolor('none')

ax.set_xticks(range(19))
ax.set_yticks(range(19))

ax.grid(color='k', linestyle='-', linewidth=1)
ax.plot(hoshi_rows, hoshi_cols, 'ko', markersize=3)

ax.set_xlim((0, 18))
ax.set_ylim((18, 0))

ax.xaxis.set_tick_params(labelbottom='off', labeltop='on')

ax.set_xticklabels(ascii_uppercase[:19])
ax.set_yticklabels(range(1, 19+1))

ax.add_patch(Circle((9, 9), .475, facecolor='k', zorder=3))

ax.add_patch(Circle((9, 10), .475, facecolor='w', zorder=3))
ax.add_patch(Circle((8, 9), .475, facecolor='w', zorder=3))
ax.add_patch(Circle((9, 8), .475, facecolor='w', zorder=3))

ax.text(15, 13, 'a', fontsize='large', backgroundcolor=BOARD_COLOR, horizontalalignment='center', verticalalignment='center')
ax.text(8, 9, 'b', fontsize='large', horizontalalignment='center', verticalalignment='center')
ax.text(9, 9, 'c', fontsize='large', color='w', horizontalalignment='center', verticalalignment='center')

plt.show()

fig = plt.figure(figsize=(5, 5), facecolor=BOARD_COLOR)
ax = fig.add_subplot(1, 1, 1)

ax.set_axis_bgcolor('none')

ax.set_xticks(range(19))
ax.set_yticks(range(19))

ax.grid(color='k', linestyle='-', linewidth=1)
ax.plot(hoshi_rows, hoshi_cols, 'ko', markersize=3)

ax.set_xlim((0, 18))
ax.set_ylim((18, 0))

ax.xaxis.set_tick_params(labelbottom='off', labeltop='on')

ax.set_xticklabels(ascii_uppercase[:19])
ax.set_yticklabels(range(1, 19+1))

ax.add_patch(Circle((9, 9), .475, facecolor='k', zorder=3))

ax.add_patch(Circle((9, 10), .475, facecolor='w', zorder=3))
ax.add_patch(Circle((8, 9), .475, facecolor='w', zorder=3))
ax.add_patch(Circle((9, 8), .475, facecolor='w', zorder=3))

ax.text(15, 13, 'a', fontsize='large', backgroundcolor=BOARD_COLOR, horizontalalignment='center', verticalalignment='center')
ax.text(8, 9, 'b', fontsize='large', horizontalalignment='center', verticalalignment='center')
ax.text(9, 9, 'c', fontsize='large', color='w', horizontalalignment='center', verticalalignment='center')

plt.show()

fig = plt.figure(figsize=(5, 5), facecolor=BOARD_COLOR)
ax = fig.add_subplot(1, 1, 1)

ax.set_axis_bgcolor('none')

ax.set_xticks(range(19))
ax.set_yticks(range(19))

ax.grid(color='k', linestyle='-', linewidth=1)
ax.plot(hoshi_rows, hoshi_cols, 'ko', markersize=3)

ax.set_xlim((0, 18))
ax.set_ylim((18, 0))

ax.xaxis.set_tick_params(labelbottom='off', labeltop='on')

ax.set_xticklabels(ascii_uppercase[:19])
ax.set_yticklabels(range(1, 19+1))

ax.add_patch(Circle((9, 9), .475, facecolor='k', zorder=3))

ax.add_patch(Circle((9., 10), .475, facecolor='w', zorder=3))
ax.add_patch(Circle((8, 9), .475, facecolor='w', zorder=3))
ax.add_patch(Circle((9, 8), .475, facecolor='w', clip_on=False, zorder=3))

ax.text(15, 13, 'a', fontsize='large', backgroundcolor=BOARD_COLOR, horizontalalignment='center', verticalalignment='center')
ax.text(8, 9, 'b', fontsize='large', horizontalalignment='center', verticalalignment='center')
ax.text(9, 9, 'c', fontsize='large', color='w', horizontalalignment='center', verticalalignment='center')

ax.add_patch(Circle((9, 8), .475, facecolor='w', clip_on=False, zorder=3))


ax.plot([9], [8], marker='^', zorder=10)

plt.show()

fig = plt.figure(figsize=(5, 5), facecolor=BOARD_COLOR)
ax = fig.add_subplot(1, 1, 1)

ax.set_axis_bgcolor('none')

ax.set_xticks(range(19))
ax.set_yticks(range(19))

ax.grid(color='k', linestyle='-', linewidth=1)
ax.plot(hoshi_rows, hoshi_cols, 'ko', markersize=3)

ax.set_xlim((0, 18))
ax.set_ylim((18, 0))

ax.xaxis.set_tick_params(labelbottom='off', labeltop='on')

ax.set_xticklabels(ascii_uppercase[:19])
ax.set_yticklabels(range(1, 19+1))

ax.add_patch(Circle((9, 9), .475, facecolor='k', zorder=3))

ax.add_patch(Circle((9., 10), .475, facecolor='w', zorder=3))
ax.add_patch(Circle((8, 9), .475, facecolor='w', zorder=3))
ax.add_patch(Circle((9, 8), .475, facecolor='w', clip_on=False, zorder=3))

ax.text(15, 13, 'a', fontsize='large', backgroundcolor=BOARD_COLOR, horizontalalignment='center', verticalalignment='center')
ax.text(8, 9, 'b', fontsize='large', horizontalalignment='center', verticalalignment='center')
ax.text(9, 9, 'c', fontsize='large', color='w', horizontalalignment='center', verticalalignment='center')

ax.add_patch(Circle((9, 8), .475, facecolor='w', clip_on=False, zorder=3))


ax.text(9, 8, '$\lambda$', fontsize='large', horizontalalignment='center', verticalalignment='center')

plt.show()

fig = plt.figure(figsize=(5, 5), facecolor=BOARD_COLOR)
ax = fig.add_subplot(1, 1, 1)

ax.set_axis_bgcolor('none')

ax.set_xticks(range(19))
ax.set_yticks(range(19))

ax.grid(color='k', linestyle='-', linewidth=1)
ax.plot(hoshi_rows, hoshi_cols, 'ko', markersize=3)

ax.set_xlim((0, 18))
ax.set_ylim((18, 0))

ax.xaxis.set_tick_params(labelbottom='off', labeltop='on')

ax.set_xticklabels(ascii_uppercase[:19])
ax.set_yticklabels(range(1, 19+1))

ax.add_patch(Circle((9, 9), .475, facecolor='k', zorder=3))

ax.add_patch(Circle((9., 10), .475, facecolor='w', zorder=3))
ax.add_patch(Circle((8, 9), .475, facecolor='w', zorder=3))
ax.add_patch(Circle((9, 8), .475, facecolor='w', clip_on=False, zorder=3))

ax.text(15, 13, 'a', fontsize='large', backgroundcolor=BOARD_COLOR, horizontalalignment='center', verticalalignment='center')
ax.text(8, 9, 'b', fontsize='large', horizontalalignment='center', verticalalignment='center')
ax.text(9, 9, 'c', fontsize='large', color='w', horizontalalignment='center', verticalalignment='center')

ax.add_patch(Circle((9, 8), .475, facecolor='w', clip_on=False, zorder=3))


ax.text(9, 8, '$\\bigtriangledown$', fontsize='large', horizontalalignment='center', verticalalignment='center')

plt.show()

fig = plt.figure(figsize=(8, 8), facecolor=BOARD_COLOR)
ax = fig.add_subplot(1, 1, 1)

ax.set_axis_bgcolor('none')

ax.set_xticks(range(19))
ax.set_yticks(range(19))

ax.grid(color='k', linestyle='-', linewidth=1)
ax.plot(hoshi_rows, hoshi_cols, 'ko', markersize=3)

ax.set_xlim((0, 18))
ax.set_ylim((18, 0))

ax.xaxis.set_tick_params(labelbottom='off', labeltop='on')

ax.set_xticklabels(ascii_uppercase[:19])
ax.set_yticklabels(range(1, 19+1))

ax.add_patch(Circle((9, 9), .475, facecolor='k', zorder=3))

ax.add_patch(Circle((9., 10), .475, facecolor='w', zorder=3))
ax.add_patch(Circle((8, 9), .475, facecolor='w', zorder=3))
ax.add_patch(Circle((9, 8), .475, facecolor='w', clip_on=False, zorder=3))

ax.text(15, 13, 'a', fontsize='large', backgroundcolor=BOARD_COLOR, horizontalalignment='center', verticalalignment='center')
ax.text(8, 9, 'b', fontsize='large', horizontalalignment='center', verticalalignment='center')
ax.text(9, 9, 'c', fontsize='large', color='w', horizontalalignment='center', verticalalignment='center')

ax.add_patch(Circle((9, 8), .475, facecolor='w', clip_on=False, zorder=3))


ax.text(9, 8, '$\\bigtriangledown$', fontsize='large', horizontalalignment='center', verticalalignment='center')

plt.show()

from matplotlib.collections import PatchCollection

fig = plt.figure(figsize=(5, 5), facecolor=BOARD_COLOR)
ax = fig.add_subplot(1, 1, 1)

ax.set_axis_bgcolor('none')

ax.set_xticks(range(19))
ax.set_yticks(range(19))

ax.grid(color='k', linestyle='-', linewidth=1)
ax.plot(hoshi_rows, hoshi_cols, 'ko', markersize=3)

for center in hoshi:
    ax.add_patch(Circle(center, .01, edgecolor='none', facecolor='k'))

ax.set_xlim((0, 18))
ax.set_ylim((18, 0))

ax.xaxis.set_tick_params(labelbottom='off', labeltop='on')

ax.set_xticklabels(ascii_uppercase[:19])
ax.set_yticklabels(range(1, 19+1))

ax.add_patch(Circle((9, 9), .475, facecolor='k', zorder=3))

ax.add_patch(Circle((9., 10), .475, facecolor='w', zorder=3))
ax.add_patch(Circle((8, 9), .475, facecolor='w', zorder=3))
ax.add_patch(Circle((9, 8), .475, facecolor='w', clip_on=False, zorder=3))

ax.text(15, 13, 'a', fontsize='large', backgroundcolor=BOARD_COLOR, horizontalalignment='center', verticalalignment='center')
ax.text(8, 9, 'b', fontsize='large', horizontalalignment='center', verticalalignment='center')
ax.text(9, 9, 'c', fontsize='large', color='w', horizontalalignment='center', verticalalignment='center')

ax.add_patch(Circle((9, 8), .475, facecolor='w', clip_on=False, zorder=3))


ax.text(9, 8, '$\\bigtriangledown$', fontsize='large', horizontalalignment='center', verticalalignment='center')

plt.show()

fig = plt.figure(figsize=(8, 8), facecolor=BOARD_COLOR)
ax = fig.add_subplot(1, 1, 1)

ax.set_axis_bgcolor('none')

ax.set_xticks(range(19))
ax.set_yticks(range(19))

ax.grid(color='k', linestyle='-', linewidth=1)
ax.plot(hoshi_rows, hoshi_cols, 'ko', markersize=3, antialiased=False)

ax.set_xlim((0, 18))
ax.set_ylim((18, 0))

ax.xaxis.set_tick_params(labelbottom='off', labeltop='on')

ax.set_xticklabels(ascii_uppercase[:19])
ax.set_yticklabels(range(1, 19+1))

ax.add_patch(Circle((9, 9), .475, facecolor='k', zorder=3))

ax.add_patch(Circle((9., 10), .475, facecolor='w', zorder=3))
ax.add_patch(Circle((8, 9), .475, facecolor='w', zorder=3))
ax.add_patch(Circle((9, 8), .475, facecolor='w', clip_on=False, zorder=3))

ax.text(15, 13, 'a', fontsize='large', backgroundcolor=BOARD_COLOR, horizontalalignment='center', verticalalignment='center')
ax.text(8, 9, 'b', fontsize='large', horizontalalignment='center', verticalalignment='center')
ax.text(9, 9, 'c', fontsize='large', color='w', horizontalalignment='center', verticalalignment='center')

ax.add_patch(Circle((9, 8), .475, facecolor='w', clip_on=False, zorder=3))


ax.text(9, 8, '$\\bigtriangledown$', fontsize='large', horizontalalignment='center', verticalalignment='center')

plt.show()

"""
Explanation: Annotation
End of explanation
"""


