title: How to plot matplotlib pcolor with last row/column AND logarithmic axis?
body: <p>I've been trying to plot a 2D histogram-like dataset that's pre-calculated. I have to plot a logarithmic x-axis against a linear y-axis with a linear/logarithmic z-axis. However, pcolor drops the last row and column, which is a problem since the highest energy value is imperative to plot. Imshow just doesn't work with a logarithmic axis.</p>
  
  <p>I'm looking at having to pad the array with NaNs to plot properly. Is there a pure plotting routine I can use? Thanks.</p>
  
  <p>Sample code:</p>
  
  <pre><code>    # INITIALIZATION
      alpha_bounds = [0.0, 90.0]
      alpha_step = 15.0
      all_alphas = np.arange(alpha_bounds[0], alpha_bounds[1], alpha_step)
      beta_bounds = [0.0, 360.0]
      beta_step = 45.0
      all_betas = np.arange(beta_bounds[0], beta_bounds[1], beta_step)
      energy_bounds = [2e3, 5e6]
      n_energies = 15
      all_energies = np.logspace(
          np.log10(energy_bounds[0]), np.log10(energy_bounds[1]), n_energies)
      all_locations =\
          [(-52.5, 180.0, r - 1), (-77.5, 260.0, r - 1)]
      alts = np.linspace(
          70.0, 600.0, 500)
  
      # ARRAY TO GET ELOSS PER ALT, LOC, BETA, ALPHA, ENERGY
      # Changed np.zeros to np.ones for testing
      eloss_per_alt_per_process = np.ones(
           (len(all_locations),
            len(all_alphas), len(all_betas), len(all_energies),
            len(alts), len(processes)))
  
      # CODE HERE TO COUNT ELOSS PER ALT, LOC, BETA, ALPHA, ENERGY
  
      # SUM OVER TWO AXES
      eloss_per_alt_per_process[0, 0, 0, 0,
                                :, :] = np.sum(eloss_per_alt, axis=(1, 2))
  
      # PLOTTING
      ALT, E = np.meshgrid(np.array(all_energies), alts)
      eloss = np.transpose(
                  eloss_per_alt_per_process[0, 0, 0, :, :, 2])
      if np.any(eloss):
                  plt.figure()
                  plt.pcolor(
                      ALT, E, eloss) #, norm=LogNorm()) #, vmin=1e-1,
                  #    vmax=ncoll.max())
                  plt.xscale('log')
      plt.show()
  </code></pre>