Matplotlib中的Matlab“轴xy”的等效值是什么?

2024-10-04 01:31:31 发布

您现在位置:Python中文网/ 问答频道 /正文

我试图用matlab和python绘制声场,但如果matlab允许我这样做:

imagesc(x,y,real(sf_vsrc)); colorbar;
axis xy
title('soundfield ground truth');

enter image description here

使用python,我会这样做:

plt.imshow(sf_vsrc_gt,extent=[x[0],x[-1],y[0],y[-1]])
plt.colorbar()
plt.show()

enter image description here

事实上,在Matlb中,如果我不放置“axis xy”,我的绘图与python相同,那么如何在python中放置“axis xy”以获得与Matlab相同的结果呢


Tags: title绘制pltsfrealxymatlabaxis