如何在matplotlib.pyplot.imshow中使用“范围”

如何在matplotlib.pyplot.imshow中使用“范围”,第1张

如何在matplotlib.pyplot.imshow中使用“范围” 在当前轴的坐标中指定要粘贴图像的矩形的角

范围定义了左右限制,以及上下限制。它需要四个值,如下所示:

extent=[horizontal_min,horizontal_max,vertical_min,vertical_max]

假设您在水平轴上有经度,请使用

extent=[longitude_top_left,longitude_top_right,latitude_bottom_left,latitude_top_left]
。longitude_top_left和longitude_bottom_left应该相同,latitude_top_left和latitude_top_right应该相同,并且这些对中的值可以互换。

如果图像的第一个元素应绘制在左下方,则也应使用

origin='lower'
imshow选项,否则,您需要使用“上”默认值。



欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/zaji/5652697.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-12-16
下一篇 2022-12-16

发表评论

登录后才能评论

评论列表(0条)

保存