Issue
I'm trying to plot a soundfield both in matlab and python but if Matlab allows me to do like this:
imagesc(x,y,real(sf_vsrc)); colorbar;
axis xy
title('soundfield ground truth');
using python I'm doing like this:
plt.imshow(sf_vsrc_gt,extent=[x[0],x[-1],y[0],y[-1]])
plt.colorbar()
plt.show()
Indeed, in Matlb if I don't put "axis xy" I have the same plot as python, so how can I put "axis xy" in python to have the same result as Matlab?
Solution
You can change it via an optional input:
plt.imshow(sf_vsrc_gt,extent=[x[0],x[-1],y[0],y[-1]], origin='lower')
or by later playing with the extent
and origin
properties.
Answered By - Ander Biguri
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.