title: Seaborn kdeplot colorbar
body: <p>I have a problem with the colorbar of my kdeplot.
  It should show the percentage in each bin starting with 0%.
  I tried two different ways, but both visualizations are not exactly what I need.</p>
  
  <p><a href="https://i.stack.imgur.com/xI8Ud.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/xI8Ud.png" alt="kdeplot with JointGrid"></a></p>
  
  <p><a href="https://i.stack.imgur.com/BvNur.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/BvNur.png" alt="kdeplot with jointplot"></a></p>
  
  <p>The version with JointGrid starts indeed with 0%, but doesn't show the other values for each color.
  Furthermore I need the "background" to be white or at least bright (not black, but shaded).</p>
  
  <p>The version with jointplot shows the values for each color, but not in percentage.</p>
  
  <p>Here is the code I used to create the visualizations:</p>
  
  <pre><code>import numpy as np
  import pandas as pd
  import matplotlib.pyplot as plt
  import seaborn as sns
  
  
  x = np.random.normal(np.tile(np.random.uniform(-5, 35, 10), 1000), 4)
  y = np.random.normal(np.tile(np.random.uniform(910, 1030, 10), 1000), 4)
  data = pd.DataFrame(x,y)
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/xI8Ud.png" rel="nofollow noreferrer">1</a></p>
  
  <pre><code>g = sns.JointGrid(x, y, data=data, space=0, xlim=[10,40], ylim=[920,1020])
  g = g.plot_joint(sns.kdeplot, cmap="Blues_d", shade=True, cbar=True, cbar_kws= 
  {'format':'%.0f%%','ticks': [0, 100]})
  g = g.plot_marginals(sns.kdeplot, shade=True)
  
  plt.subplots_adjust(left=0.1, right=0.8, top=0.9, bottom=0.1)
  pos_joint_ax = g.ax_joint.get_position()
  pos_marg_x_ax = g.ax_marg_x.get_position()
  g.ax_joint.set_position([pos_joint_ax.x0, pos_joint_ax.y0, pos_marg_x_ax.width, pos_joint_ax.height])
  g.fig.axes[-1].set_position([.83, pos_joint_ax.y0, .07, pos_joint_ax.height])
  
  plt.show()
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/BvNur.png" rel="nofollow noreferrer">2</a></p>
  
  <pre><code>kdeplot = sns.jointplot(x, y, kind="kde", cbar=True, xlim=[10,40], ylim=[920,1020])
  
  plt.subplots_adjust(left=0.1, right=0.8, top=0.9, bottom=0.1)
  pos_joint_ax = kdeplot.ax_joint.get_position()
  pos_marg_x_ax = kdeplot.ax_marg_x.get_position()
  kdeplot.ax_joint.set_position([pos_joint_ax.x0, pos_joint_ax.y0, pos_marg_x_ax.width, 
  pos_joint_ax.height])
  kdeplot.fig.axes[-1].set_position([.83, pos_joint_ax.y0, .07, pos_joint_ax.height])
  
  plt.show()
  </code></pre>
  
  <p>Can anyone help me here, please? I'm really lost.</p>