आप इसे matplotlib.patches.Circle
पैच के साथ कर सकते हैं।
आपके उदाहरण के लिए, हमें एक्स और वाई सरणी के माध्यम से लूप करने की आवश्यकता है, और फिर प्रत्येक समन्वय के लिए एक सर्कल पैच बनाएं।
यहाँ (matplotlib.cbook
से) एक छवि के शीर्ष पर हलकों रखकर एक उदाहरण
import matplotlib.pyplot as plt
import numpy as np
from matplotlib.patches import Circle
# Get an example image
import matplotlib.cbook as cbook
image_file = cbook.get_sample_data('grace_hopper.png')
img = plt.imread(image_file)
# Make some example data
x = np.random.rand(5)*img.shape[1]
y = np.random.rand(5)*img.shape[0]
# Create a figure. Equal aspect so circles look circular
fig,ax = plt.subplots(1)
ax.set_aspect('equal')
# Show the image
ax.imshow(img)
# Now, loop through coord arrays, and create a circle at each x,y pair
for xx,yy in zip(x,y):
circ = Circle((xx,yy),50)
ax.add_patch(circ)
# Show the image
plt.show()
की संभावित डुप्लिकेट [pyplot साथ एक चक्र साजिश] (है http://stackoverflow.com/questions/9215658/साजिश-ए-सर्कल-साथ-पिपलॉट) – kazemakase
क्या आप निश्चित हैं? .. – orkan
बहुत कुछ। उस प्रश्न के उत्तर बताते हैं कि सर्कल कैसे आकर्षित करें, जो आपने बिल्कुल पूछा है :) – kazemakase