import matplotlib.pyplot as plt
import numpy as np
def draw_circle_with_number(number, filename):
fig, ax = plt.subplots(figsize=(5, 5))
ax.set_xlim(0, 1)
ax.set_ylim(0, 1)
# draw circular
circle = plt.Circle((0.5, 0.5), 0.4, color='blue', fill=False, linewidth=4)
ax.add_artist(circle)
# add text
ax.text(0.5, 0.5, f'{number:03}', color='black', fontsize=90,
ha='center', va='center', weight='bold')
# hide axis
ax.set_xticks([])
ax.set_yticks([])
ax.set_aspect('equal')
# save to file
plt.savefig(filename, bbox_inches='tight', pad_inches=0)
plt.close()
# ceate 001 ~ 100
for i in range(1, 101):
draw_circle_with_number(i, f'circle_{i:03}.png')
Categories
- FFMpeg (5)
- Libav (1)
- Google (3)
- iBeacon (1)
- LDAP (3)
- Me (2)
- Network (11)
- OS (149)
- RTMP (4)
- SIP (1)
- Kamailio (1)
- SNMP (1)
- VMware (20)
- VCP考試 (1)
- 伺服器 網站服務 (105)
- 名詞解釋 (4)
- 專案管理 (1)
- 工具軟體 (51)
- Adobe (1)
- FMS (1)
- Cloudera (1)
- Docker (1)
- Eclipse (4)
- Intellij (2)
- OBS (2)
- Office (10)
- Excel (4)
- PowerPoint (5)
- Postman (2)
- Splunk (13)
- Virtualbox (2)
- Visual Studio (2)
- 文字編輯器 (10)
- Sublime Text 2 (6)
- Sublime Text 3 (3)
- Vim (3)
- 連線工具 (1)
- Xshell (1)
- Adobe (1)
- 程式語言 (81)
- CSS (2)
- HTML (2)
- iOS (1)
- Java (31)
- JavaScript (5)
- jQuery (4)
- jsTree (2)
- JSP (3)
- PHP (16)
- Python (8)
- Ruby (1)
- sed (1)
- Shell Script (8)
- Windows Bash Script (1)
- XML (1)
- 資料庫 (38)
- FFMpeg (5)