You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import matplotlib.pyplot as plt
import matplotlib.patches as patches
from PIL import Image
import numpy as np
x = np.array(Image.open('geek.png'), dtype=np.uint8)
plt.imshow(x)
# Create figure and axes
fig, ax = plt.subplots(1)
# Display the image
ax.imshow(x)
# Create a Rectangle patch
rect = patches.Rectangle((50, 100), 40, 30, linewidth=1,
edgecolor='r', facecolor="none")
# Add the patch to the Axes
ax.add_patch(rect)
plt.show()
The text was updated successfully, but these errors were encountered:
The text was updated successfully, but these errors were encountered: