Skip to content

Instantly share code, notes, and snippets.

@lkluft
Last active April 27, 2016 07:57
Show Gist options
  • Save lkluft/8add95eaf498898507e995105b38b38c to your computer and use it in GitHub Desktop.
Save lkluft/8add95eaf498898507e995105b38b38c to your computer and use it in GitHub Desktop.
Center a colormap around zero.
Display the source blob
Display the rendered blob
Raw
{
"cells": [
{
"metadata": {
"trusted": true,
"collapsed": false,
"ExecuteTime": {
"start_time": "2016-04-27T09:56:48.446315",
"end_time": "2016-04-27T09:56:48.777059"
}
},
"cell_type": "code",
"source": "%matplotlib inline\nimport numpy as np\nimport matplotlib.pyplot as plt\n\ndef abs_range(v):\n abs_max = np.abs(v).max()\n return -abs_max, abs_max\n\nx = np.linspace(-5, 5, 100)\ny = np.linspace(-5, 5, 100)[:, np.newaxis]\nz = x + y + 2.3\n\nvmin = np.min((0, z.min()))\nvmax = np.max((0, z.max()))\n\nfig, ax = plt.subplots()\npc = ax.pcolormesh(x, y, z, cmap='RdBu_r', vmin=vmin, vmax=vmax)\nax.set_xlim(x.min(), x.max())\nax.set_ylim(y.min(), y.max())\ncb = fig.colorbar(pc)\ncb.set_clim(abs_range(z))",
"execution_count": 1,
"outputs": [
{
"output_type": "display_data",
"data": {
"text/plain": "<matplotlib.figure.Figure at 0x7fdb82f39048>",
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAWUAAAD7CAYAAACynoU8AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJztnXuwZVWd37/fcxumBJUZJ9hq9wAK4viIadDpBoGG+Aow\nDFRNpjISq4yaqDUzlGa0iA+sSWmN42MSzYgaBZ2ZYHRIxRSCqdFpjCUPFdI09IjQCBjoQNu0TzTI\nlN197y9/7HPvXXufvc9e56y19157n++n6hbnrPVbj750r/M7v/39/RbNDEIIIdJg1PUGhBBCrKND\nWQghEkKHshBCJIQOZSGESAgdykIIkRA6lIUQIiE2tLUQSWnvhBDemBlDxj+JG+wxLPua7zWzE0LW\niwXb0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tOtNxMTMvmq2pii9BcDmLvcTwFYA95nZXjM7BOBq\nABd1vKdgzOwRM9s9fv0YgD0ANnW7q3DGDs75AD7d9V4WgUEeyiQvBPCQmd3Z9V4a5PUAvtz1JuZk\nE4CHnPcPYwCHlwvJEwBsAdC/NLhJVh0cSbVaoLfJIySvB7DRbUL2l+bdAN6FLHTh9vWCKX+uy8zs\nS2Oby5CVAfx8B1sUNZB8IoAvAHjL2GPuLSR/G8ABM9tN8hz06N9SX+ntoVyVAknyBQBOAPD3JIns\nK/4uklvN7ActbnEuPFI7X4vsq+RLW9lQM+wDcJzzfvO4rfeQ3IDsQP6smV3b9X4icAaAC0meD+AJ\nAJ5E8ioze03H+xosg08eIfkAgFNnqWeaKiTPBfAfAWw3sx93vZ95GdcM+C6AlwHYD+B/A7jYzPZ0\nurEIkLwKwI/M7K1d7yU2JM8G8DYzu7DrvQyZQcaUCxiG85XrcgBPRFYK8HaSn+h6Q/NgZssALkGm\nJrkLwNUDOZDPAPBqAC8lecf4/9G5Xe9L9IvBe8pCCNEnFsFTFkKI3qBDWQghEkKHshBCJIQOZSGE\nSAgdykIIkRA6lIUQIiF0KAshRELoUBZCiIT4/5nyo4fmkcGfAAAAAElFTkSuQmCC\n"
},
"metadata": {}
}
]
}
],
"metadata": {
"kernelspec": {
"name": "python3",
"display_name": "Python 3",
"language": "python"
},
"_draft": {
"nbviewer_url": "https://gist.github.com/8add95eaf498898507e995105b38b38c"
},
"language_info": {
"file_extension": ".py",
"nbconvert_exporter": "python",
"mimetype": "text/x-python",
"version": "3.5.1",
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"name": "python",
"pygments_lexer": "ipython3"
},
"toc": {
"toc_window_display": false,
"toc_cell": false,
"toc_number_sections": true,
"toc_threshold": 6
},
"gist": {
"id": "8add95eaf498898507e995105b38b38c",
"data": {
"description": "Center a colormap around zero.",
"public": true
}
}
},
"nbformat": 4,
"nbformat_minor": 0
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment