Last active
August 14, 2024 22:35
-
-
Save thesamovar/52dbbb3a58a73c590d54c34f5f719bac to your computer and use it in GitHub Desktop.
Automatic scientific axes layout for matplotlib.ipynb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"cells": [ | |
{ | |
"metadata": { | |
"trusted": true | |
}, | |
"cell_type": "code", | |
"source": "%matplotlib inline\nimport matplotlib.pyplot as plt\nimport matplotlib.gridspec as gridspec\nfrom matplotlib import transforms", | |
"execution_count": 1, | |
"outputs": [] | |
}, | |
{ | |
"metadata": { | |
"trusted": true | |
}, | |
"cell_type": "code", | |
"source": "def panel_specs(layout, fig=None):\n # default arguments\n if fig is None:\n fig = plt.gcf()\n # format and sanity check grid\n lines = layout.split('\\n')\n lines = [line.strip() for line in lines if line.strip()]\n linewidths = set(len(line) for line in lines)\n if len(linewidths)>1:\n raise ValueError('Invalid layout (all lines must have same width)')\n width = linewidths.pop()\n height = len(lines)\n panel_letters = set(c for line in lines for c in line)-set('.')\n # find bounding boxes for each panel\n panel_grid = {}\n for letter in panel_letters:\n left = min(x for x in range(width) for y in range(height) if lines[y][x]==letter)\n right = 1+max(x for x in range(width) for y in range(height) if lines[y][x]==letter)\n top = min(y for x in range(width) for y in range(height) if lines[y][x]==letter)\n bottom = 1+max(y for x in range(width) for y in range(height) if lines[y][x]==letter)\n panel_grid[letter] = (left, right, top, bottom)\n # check that this layout is consistent, i.e. all squares are filled\n valid = all(lines[y][x]==letter for x in range(left, right) for y in range(top, bottom))\n if not valid:\n raise ValueError('Invalid layout (not all square)')\n # build axis specs\n gs = gridspec.GridSpec(ncols=width, nrows=height, figure=fig)\n specs = {}\n for letter, (left, right, top, bottom) in panel_grid.items():\n specs[letter] = gs[top:bottom, left:right]\n return specs, gs\n\ndef panels(layout, fig=None):\n # default arguments\n if fig is None:\n fig = plt.gcf()\n specs, gs = panel_specs(layout, fig=fig)\n axes = {}\n for letter, spec in specs.items():\n axes[letter] = fig.add_subplot(spec)\n return axes, gs\n\ndef label_panel(ax, letter, *,\n offset_left=0.8, offset_up=0.2, prefix='', postfix='.', **font_kwds):\n kwds = dict(fontsize=18)\n kwds.update(font_kwds)\n # this mad looking bit of code says that we should put the code offset a certain distance in\n # inches (using the fig.dpi_scale_trans transformation) from the top left of the frame\n # (which is (0, 1) in ax.transAxes transformation space)\n fig = ax.figure\n trans = ax.transAxes + transforms.ScaledTranslation(-offset_left, offset_up, fig.dpi_scale_trans)\n ax.text(0, 1, prefix+letter+postfix, transform=trans, **kwds)\n\ndef label_panels(axes, letters=None, **kwds):\n if letters is None:\n letters = axes.keys()\n for letter in letters:\n ax = axes[letter]\n label_panel(ax, letter, **kwds)\n \nlayout = '''\n AAB\n AA.\n .CC\n '''\nfig = plt.figure(figsize=(10, 7))\naxes, spec = panels(layout, fig=fig)\nspec.set_width_ratios([1, 3, 1])\nlabel_panels(axes, letters='ABC')\nplt.tight_layout()", | |
"execution_count": 2, | |
"outputs": [ | |
{ | |
"output_type": "display_data", | |
"data": { | |
"text/plain": "<Figure size 720x504 with 3 Axes>", | |
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAsgAAAHwCAYAAAC7apkrAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4yLjEsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+j8jraAAAgAElEQVR4nO3df6zlZ30n9venM7gNvxGepGRsNl7WYAbVpnAxVFoUkzTB47SxsguqDYHFNXXd4Cj9o11bakPa0lUWrdIlCDujqeX1orZYVbDAJANWtioQlXXX16mxGVyzU1uxJ6b1GFLQmm68gz/94x6TJ5c7njPjud8z557XSzqa+/1+n3v01qOje97++jnnqe4OAACw4V9bdAAAADibKMgAADBQkAEAYKAgAwDAQEEGAICBggwAAAMFGQAABqdUkKvqVVX1L6uqq+pXtysUALAaquqyWa8Y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aZ7/clubO7H0uS7jbnp2+e+e4kL6uqSvLSJN9NcnzamDtHd381G3N4Iqf8fqkgw9npRFtQn+oY5nOqc3ltki9ua6Kd7aTzXVV7k/xKkgMT5tqp5nl9vz7Jq6rqy1V1X1V9cLJ0O8888/2pJG/MxsZQDyb5je5+dpp4K+mU3y99DzKcnc7YNtXMZe65rKp3ZaMg/81tTbSzzTPfn0hyY3f/cOMmGy/APPO9O8lbk/x8kp9I8k+r6p7u/tZ2h9uB5pnvdye5P8nPJXldkj+qqj/u7u9vd7gVdcrvlwoynJ1sUz2tueayqi5OcmuS/d39nYmy7UTzzPdakjtm5fjcJFdU1fHu/tw0EXeUef+ePNXdTyd5uqq+muSSJAryqZtnvq9J8vd7YzOKI1X1aJKLkvyzaSKunFN+v7TEAs5Otqme1knnu6pem+TOJB9wV+0FO+l8d/cF3f0z3f0zSX4/ya8px6dtnr8nn0/yzqraXVUvTvL2JA9NnHOnmGe+H8vG3fpU1U8leUOSRyZNuVpO+f3SHWQ4C23jNtVsYc75/miSVye5ZXZX83h3ry0q8zKbc745Q+aZ7+5+qKq+lOSBJM8mubW7t/zKLJ7fnK/vjyW5vaoezMb//r+xu59aWOglV1Wfyca3gZxbVUeT/FaSFyWn/35pq2kAABhYYgEAAAMFGQAABgoyAAAMFGQAABgoyAAAMFCQAQBgoCADAMDg/wev2CRNIeig5AAAAABJRU5ErkJggg==\n" | |
}, | |
"metadata": { | |
"needs_background": "light" | |
} | |
} | |
] | |
}, | |
{ | |
"metadata": { | |
"trusted": true | |
}, | |
"cell_type": "code", | |
"source": "layout = '''\n AAAB\n CDEB\n '''\nfig = plt.figure(figsize=(10, 5))\naxes, spec = panels(layout, fig=fig)\nlabel_panels(axes)\nplt.tight_layout()", | |
"execution_count": 3, | |
"outputs": [ | |
{ | |
"output_type": "display_data", | |
"data": { | |
"text/plain": "<Figure size 720x360 with 5 Axes>", | |
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAsUAAAFgCAYAAABT8gTYAAAABH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D21yjrthoz8HbXKGu2GjPwdtcoa7Y9XPQy9On6j1vaRjIyb8Gd4B/OMkx4D/B1xcw7dgbhRJPsPgXa2nJ1kAPgQ8B7rxPLTJOd4YnOET5wxvDM7wiXOGN471mGMv8yxJkqTe68vpE5IkSdKyLMWSJEnqPUuxJEmSes9SLEmSpN6zFEuSJKn3LMWSJEnqPUuxJEmSeu//A4MnFRPxYmcIAAAAAElFTkSuQmCC\n" | |
}, | |
"metadata": { | |
"needs_background": "light" | |
} | |
} | |
] | |
}, | |
{ | |
"metadata": { | |
"trusted": true | |
}, | |
"cell_type": "code", | |
"source": "def tight_xticklabels(ax=None):\n if ax is None:\n ax = plt.gca()\n ticklabels = ax.get_xticklabels()\n ticklabels[0].set_ha('left')\n ticklabels[0].set_text(' '+ticklabels[0].get_text())\n ticklabels[-1].set_ha('right')\n ticklabels[-1].set_text(ticklabels[-1].get_text()+' ')\n ax.set_xticklabels(ticklabels)\n \ndef tight_yticklabels(ax=None):\n if ax is None:\n ax = plt.gca()\n ticklabels = ax.get_yticklabels()\n ticklabels[0].set_va('bottom')\n ticklabels[-1].set_va('top')", | |
"execution_count": 4, | |
"outputs": [] | |
}, | |
{ | |
"metadata": { | |
"trusted": true | |
}, | |
"cell_type": "code", | |
"source": "layout = '''\n AAAB\n AAAC\n AAAD\n '''\nN = 5\nfig = plt.figure(figsize=(8, 6))\nspecs, gs = panel_specs(layout, fig=fig)\naxes = {}\nfor letter in 'BCD':\n axes[letter] = ax = fig.add_subplot(specs[letter])\n label_panel(ax, letter)\nsubgs = specs['A'].subgridspec(N, N, wspace=0, hspace=0)\ntriaxes = {}\ntighten = []\nfor i in range(N):\n for j in range(i+1):\n triaxes[i, j] = ax = fig.add_subplot(subgs[i, j])\n if i==N-1:\n ax.set_xlabel(chr(ord('α')+j))\n tighten.append((tight_xticklabels, ax))\n else:\n ax.set_xticks([])\n if j==0:\n ax.set_ylabel(chr(ord('α')+i))\n tighten.append((tight_yticklabels, ax))\n else:\n ax.set_yticks([])\nlabel_panel(triaxes[0, 0], 'A')\nplt.tight_layout()\nfor f, ax in tighten:\n f(ax)\nplt.tight_layout()", | |
"execution_count": 5, | |
"outputs": [ | |
{ | |
"output_type": "display_data", | |
"data": { | |
"text/plain": "<Figure size 576x432 with 18 Axes>", | |
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAjgAAAGoCAYAAABL+58oAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4yLjEsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+j8jraAAAgAElEQVR4nO3df7Rl9X3X/+erA6TJ2EplsFB+lcZJRohthNMBNLr4qrQDYolputYQA4LUkRiWS2NWxdWaaFuN/S6XbSg007FOKamC0cQ4Jpdg6o9Cu0o6dxAIEGknlJQBGiC0g5QkdJq3f5wz9OTOmbnnXu45+8d9PtY6a87Z+7PPvO9nDpzX3fuzP59UFZIkSX3yDU0XIEmStNYMOJIkqXcMOJIkqXcMOJIkqXcMOJIkqXcMOJIkqXcMOJIkqXdWFHCSfEuSrySpJO+cVVGSJI1LcvHou2f88ZUkjyX5+SR/uuka1S7HrbD93wBOAH4LuA74xTWvSJKko7sdWBg9fy3wncAPAt+f5M9U1Rcaq0ytstKAcx3wP4H/AvxUktdX1efXvixJkia6r6q+7pfrJL8JfBB4G/CTjVSl1pn6ElWS84A3A78A/DvgD4BrZ1SXJEnTemr058uNVqFWWckYnOuA3wc+WlVfAj4J/M0kDlSWJM3L65JsGj3OSHIp8M+B54CPNlybWmSqcJLkG4Ergf9UVb8/2vwLwOnA986oNkmSlvpnwLOjx28zHI9zCPgLVfU7TRamdpn27MvbgG9hGGoO+yTwDPC31rooSZKOYhdwyejx14B/BGwCFpKc1WRhapdpBxlfxzAtH0jyp8a2fxr4gSSbquq5Na9OkqSv95tV9Utjrz+R5JeBe4GfALY3U5baZtmAk+Rs4P8DAvzGUZq9E/ipNax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5O8tqq+3HRNkprhGZyWSPIjST47+s3zLUn+a9M1tcC3Ar9TVc8DW0bbDjZYTysk+XSS94y9fl+SH2qyphb5GeATST4NfE/TxbRBkg1Jbkvy+SR7k/zDpmuS5sHFNlsgyYXA9wN/Fng78J+A9zdaVDt8A1BJ/jHw48CuqvpawzW1wfcBDyS5meGsn1cBf7HZkpqX5DSGU7h/J3Ai8CtJfrOqHmm2ssZtYTjN/paq+oOmi5HmxTM47XAR8MmqOgR8CviTwCeaLak9quoDwMnAtyf5203X07TRZZf/AXwv8JeBR6vq6WaraoW3Ar9aVV8bnfX7KMP+We8+B/w68EySm5ouRpoXz+C0x1fH/nyyqp5sspi2qarnk9zOMAwK/iNwDcP/hh1MO3QcX///tIwe690WhosmnlJVX12usdQXnsFph0Xgz4+efx/wbUlObrCeNjkjyRtGzy9guPig4H8Bfw54C+B4raFfBt6a5HVJNgJ/Hbi74Zra4PXA8cAhgCTf0mw50nx4BqcFquqe0a2tC8BG4GrgY0m+t6peari8ph0C/kuSQ8B+4B81XE8rVNUfJvkfwJer6uWm62mDqro/yS7gMwzP3PxsVd3fcFlt8CmGl+8eSfIVhper1v2lXvWft4mrtZJ8O/CJqnpTw6W0UpJ/CrxYVf+q6VokqW28RCVJknrHMziSJKl3PIMjSZJ6x4AjSZJ6x4AjSZJ6x4AjSZJ6x4AjSZJ65/8Bfad19j8lzDkAAAAASUVORK5CYII=\n" | |
}, | |
"metadata": { | |
"needs_background": "light" | |
} | |
} | |
] | |
} | |
], | |
"metadata": { | |
"_draft": { | |
"nbviewer_url": "https://gist.github.com/52dbbb3a58a73c590d54c34f5f719bac" | |
}, | |
"gist": { | |
"id": "52dbbb3a58a73c590d54c34f5f719bac", | |
"data": { | |
"description": "Automatic scientific axes layout for matplotlib.ipynb", | |
"public": true | |
} | |
}, | |
"kernelspec": { | |
"name": "conda-env-brian-py", | |
"display_name": "Python [conda env:brian]", | |
"language": "python" | |
}, | |
"language_info": { | |
"name": "python", | |
"version": "3.8.2", | |
"mimetype": "text/x-python", | |
"codemirror_mode": { | |
"name": "ipython", | |
"version": 3 | |
}, | |
"pygments_lexer": "ipython3", | |
"nbconvert_exporter": "python", | |
"file_extension": ".py" | |
} | |
}, | |
"nbformat": 4, | |
"nbformat_minor": 4 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment