-
Notifications
You must be signed in to change notification settings - Fork 62
Open
Description
Describe your question
在画散点图时,无法将点的形状设置为自定义图片(并设置图片的像素大小)
希望将下图“全部完成”替换“绿色的9个不同位置的点”,像素设置为532 × 140,并覆盖在其他蓝色点上(可以覆盖一部分)
code
(以下代码只给出了绿色点)
import matplotlib.pyplot as plt
xpos = [-300, -300, -300, 0, 0, 0, 300, 300, 300]
ypos = [-533, 0, 533, -533, 0, 533, -533, 0, 533]
fig,ax = plt.subplots(figsize=(6,8))# 设置图大小
ax.set_ylim(800,-800) # 设置坐标轴
ax.set_xlim(-600,600)
# ax.scatter(x, y, marker='o', color='blue', alpha=0.3, edgecolor='black') 蓝色点就先不传数据啦
ax.scatter(xpos, ypos, marker='o', color='green')
plt.title('hotzone scatter plot ')
from PIL import Image
im_path = '长条按钮480.png'
target = Image.open(im_path)
target
@hupili Could you please help me?
Metadata
Metadata
Assignees
Labels
No labels