Skip to content

代码

“`python
import matplotlib.pyplot as plt
import numpy as np

def create_acupoint_image():
# 创建一个图像,用于绘制穴位
fig, ax = plt.subplots(figsize=(6, 6))
ax.set_xlim(0, 10)
ax.set_ylim(0, 10)
ax.set_aspect(‘equal’, adjustable=’box’)

# 绘制穴位
# 内关穴位位置
ax.plot(5, 2, ‘o’, color=’red’, label=’内关’)
ax.text(5, 2, ‘内关’, fontsize=12, ha=’center’, va=’center’)

# 合谷穴位位置
ax.plot(8, 8, ‘o’, color=’green’, label=’合谷’)
ax.text(8, 8, ‘合谷’, fontsize=12, ha=’center’, va=’center’)

# 设置网格线
ax.grid(True)

# 设置图例
ax.legend()

# 显示图像
plt.show()

create_acupoint_image()
“`