📜  仅在 matplotlib 中绘制带边框的矩形 - Python 代码示例

📅  最后修改于: 2022-03-11 14:47:12.647000             🧑  作者: Mango

代码示例1
from matplotlib import pyplot as plt
from matplotlib.patches import Rectangle
someX, someY = 0.5, 0.5
plt.figure()
currentAxis = plt.gca()
currentAxis.add_patch(Rectangle((someX - .1, someY - .1), 0.2, 0.2,alpha=1))
plt.show()