for i in range(2):
for j in range(3):
ad = ds.all_data() #here I normally go over selecting the required data
bins_dense = np.logspace(-29, -21, num=80)
bins_vz = np.linspace(-1000, 1000, num=80)
logs = dict(velocity_cylindrical_z=False, density=True)
units = dict(velocity_cylindrical_z='km/s')
profile = yt.create_profile(gal_dense, ['density', 'velocity_cylindrical_z'], fields='cell_mass', weight_field=None, units=units, logs=logs, override_bins={'density': bins_dense, 'velocity_cylindrical_z': bins_vz})
prof = profile['cell_mass']
im = ax[i, j].pcolormesh(profile.x, profile.y, prof.d.T, cmap='arbre', norm = matplotlib.colors.LogNorm(vmin=1e0, vmax=1e4))
ax[i, j].set_xscale('log')
ax[i, j].set_xlim(1e-29, 1e-21)
ax[i, j].set_ylim(-1000, 1000)