Python pyplot.ginput()会导致轴发生变化吗?
使用matplotlib.pyplot ginput()函数存储单击点时,我遇到了一些奇怪的行为。在第一次单击时,单击图像的轴范围更改为每侧增加200。在绘制新内容之前,图像将保留此空白边框 示例代码:Python pyplot.ginput()会导致轴发生变化吗?,python,matplotlib,Python,Matplotlib,使用matplotlib.pyplot ginput()函数存储单击点时,我遇到了一些奇怪的行为。在第一次单击时,单击图像的轴范围更改为每侧增加200。在绘制新内容之前,图像将保留此空白边框 示例代码: import matplotlib.pyplot as plt plt.imshow(im1) x = plt.ginput(4) 第一次单击鼠标时,轴从(0,imageWidth)和(0,imageHeight)更改为(-200,imageWidth+200)和(-200,imageHeig
import matplotlib.pyplot as plt
plt.imshow(im1)
x = plt.ginput(4)
第一次单击鼠标时,轴从(0,imageWidth)和(0,imageHeight)更改为(-200,imageWidth+200)和(-200,imageHeight+200)
图像本身不会受到任何影响。对当前图形调用ginput时也会发生相同的行为 还有其他人遇到过这种情况吗?有什么解释吗?修复?试试看
plt.imshow(im1)
plt.axis('image')
x = plt.ginput(4)
我学会了这一点