title: Shifted color of
body: <p>Im trying to achieve this ideal graphical formatting of the plot:
  <a href="https://i.stack.imgur.com/gDhiZ.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/gDhiZ.jpg" alt="enter image description here" /></a></p>
  <p>I successfully generated the graph, also somehow (<code>plt.pcolor</code>) overwrited the default colors of plot (something that maybe is overkill, but I cannot find other option), but I'm struggling that:</p>
  <ol>
  <li>Next color layer have offset to main grid</li>
  </ol>
  <p><a href="https://i.stack.imgur.com/z9M1O.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/z9M1O.jpg" alt="enter image description here" /></a></p>
  <ol start="2">
  <li>I also have no idea how remove all tick (sticks) from top, left, down but keep labels</li>
  <li>And I would like to shift upper labels more down</li>
  <li>I also want to add 3 conditions for color. The blue can be also gradual blue based on first plot color</li>
  </ol>
  <p><a href="https://i.stack.imgur.com/uqxCX.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/uqxCX.jpg" alt="enter image description here" /></a></p>
  <p>Here is functional code to generate the plot (on the middle picture):</p>
  <pre><code>import numpy as np
  import pandas as pd
  from datetime import datetime as dt
  from datetime import timedelta
  import matplotlib
  import matplotlib.pyplot as plt
  from calendar import monthrange
  import matplotlib.colors as mcolors
  
  def create_graph(all_rows, task_names, farmers):
  
      harvest = np.array(all_rows)
      fig, ax = plt.subplots()
      im = ax.imshow(harvest)
  
      # We want to show all ticks...
      ax.set_xticks(np.arange(len(farmers)))
      ax.set_yticks(np.arange(len(task_names)))
      # ... and label them with the respective list entries
      ax.set_xticklabels(farmers, fontsize=4)
      ax.set_yticklabels(task_names, fontsize=8)
  
      # Rotate the tick labels and set their alignment.
      plt.setp(ax.get_xticklabels(), rotation=0, ha=&quot;center&quot;, rotation_mode=&quot;anchor&quot;)
      ax.tick_params(top=True, bottom=False, labeltop=True, labelbottom=False)
      
      #Turn spines off and create white grid.
      for edge, spine in ax.spines.items():
          spine.set_visible(False)
  
      cmap, norm = mcolors.from_levels_and_colors([0, 1, 4], ['grey', 'green'])
  
      plt.pcolor(harvest, cmap=cmap, norm=norm, snap=True) 
      ax.set_xticks(np.arange(harvest.shape[1]+1)-.5, minor=True)
      ax.set_yticks(np.arange(harvest.shape[0]+1)-.5, minor=True)
      ax.grid(which=&quot;minor&quot;, color=&quot;w&quot;, linestyle='-', linewidth=1)
      
      # ax.tick_params(which=&quot;minor&quot;, bottom=False, left=False)
      # ax.set_title(&quot;Harvest of local farmers (in tons/year)&quot;)
      fig.tight_layout()
      plt.show()
      plt.close()
  
  
  vegetables = [&quot;cucumber&quot;, &quot;tomato&quot;, &quot;lettuce&quot;, &quot;asparagus&quot;,
                    &quot;potato&quot;, &quot;wheat&quot;, &quot;barley&quot;]
  farmers = [1, 2, 3, 4, 5, 6, 7]
      
  harvest = np.array([[0.8, 2.4, 2.5, 3.9, 0.0, 4.0, 0.0],
                      [2.4, 0.0, 4.0, 1.0, 2.7, 0.0, 0.0],
                      [1.1, 2.4, 0.8, 4.3, 1.9, 4.4, 0.0],
                      [0.6, 0.0, 0.3, 0.0, 3.1, 0.0, 0.0],
                      [0.7, 1.7, 0.6, 2.6, 2.2, 6.2, 0.0],
                      [1.3, 1.2, 0.0, 0.0, 0.0, 3.2, 5.1],
                      [0.1, 2.0, 0.0, 1.4, 0.0, 1.9, 6.3]])
      
  create_graph(harvest, vegetables, farmers)
  </code></pre>
  <p>I tried to look in matplotlib but, I'm not more wise than before.</p>