Creating a log-linear plot in matplotlib using hist2d
I was just wondering if this can be done. I have tried to set the bins explicitly using numpy logspace, and I have also tried to set the xscale to 'log'. Neither of these options work. Has anybody ever tried this? I just want a 2d histogram with a log x-axis and a linear y-axis. Joe Kington The reason it's not working correctly is that plt.hist2d uses the pcolorfast method, which is much more efficient for large images, but doesn't support log axes. To have a 2D histogram that works correctly on log axes, you'll need to make it yourself using np.histogram2d and ax.pcolor . However, it's only