It's less that this is *desired* and more that it just is what it is. This is mostly holdovers from much earlier in yt's history. The profile2d code is pretty isolated though, and I think we could probably fix it up. Can you file a bug?
On Fri, May 1, 2020 at 8:36 PM Daegene Koh email@example.com wrote:
I’ve been generating phase plot data and overlaying other lines using matplotlib and I noticed that passing the profile data as is into pcolormesh results in a flipped plot. In order to get the correct image, I find that I need to do a transpose to the 2-d array before passing it to pcolormesh.
Is this the desired behavior?
Just a snippet of what I’m doing.
p2d = sph.profile(['density','magnetic_field_magnitude’],['cell_mass'],weight_field=None) C = p2d['cell_mass'].in_units('Msun’) #C = p2d['cell_mass'].in_units('Msun’).transpose() <- I have to do this to get it right fig = plt.figure(figsize=(8,6)) ax = fig.add_subplot(111) ax.set_xscale('log’) ax.set_yscale('log') ax.pcolormesh(p2d.x,p2d.y,C,norm=colors.LogNorm())
yt-users mailing list -- firstname.lastname@example.org To unsubscribe send an email to email@example.com https://mail.python.org/mailman3/lists/yt-users.python.org/ Member address: firstname.lastname@example.org