Drawing rectangle with border only in matplotlib 1

Drawing rectangle with border only in matplotlib

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()

Here is what the above code is Doing:
1. Create a figure
2. Get the current axis
3. Add a rectangle patch to the axis
4. Show the figure

Similar Posts