-
-
Save aladinoster/6faaa28d9fde34e6a8efa1053278b63d to your computer and use it in GitHub Desktop.
This file contains hidden or 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": [ | |
| { | |
| "cell_type": "code", | |
| "execution_count": null, | |
| "id": "3b291db3-dbff-4ec5-bbb0-f68535bb0261", | |
| "metadata": {}, | |
| "outputs": [], | |
| "source": [ | |
| "import re\n", | |
| "import matplotlib as mpl\n", | |
| "from ipywidgets import interactive\n", | |
| "from IPython.display import HTML, display" | |
| ] | |
| }, | |
| { | |
| "cell_type": "code", | |
| "execution_count": null, | |
| "id": "c6fe3b38-bfaa-44a4-ab2b-92cb4fbe9254", | |
| "metadata": {}, | |
| "outputs": [], | |
| "source": [ | |
| "@interactive\n", | |
| "def rcparam_viewer(param=\"\"):\n", | |
| " try:\n", | |
| " content = \"\".join(\n", | |
| " f\"<tr><td>{k}</td><td>{v}</td></tr>\"\n", | |
| " for k, v in mpl.rcParams.items() if param and re.search(param, k)\n", | |
| " )\n", | |
| " except re.error:\n", | |
| " return\n", | |
| " html = f\"<div style='height: 400px; overflow-y: auto'><table>{content}</table></div>\"\n", | |
| " display(HTML(html))" | |
| ] | |
| }, | |
| { | |
| "cell_type": "code", | |
| "execution_count": null, | |
| "id": "726807df-821e-4d12-a028-46bba9c27e60", | |
| "metadata": {}, | |
| "outputs": [], | |
| "source": [ | |
| "rcparam_viewer" | |
| ] | |
| }, | |
| { | |
| "cell_type": "code", | |
| "execution_count": null, | |
| "id": "d6fb772d-bf26-4c78-bacb-80115c2bbed6", | |
| "metadata": {}, | |
| "outputs": [], | |
| "source": [] | |
| } | |
| ], | |
| "metadata": { | |
| "kernelspec": { | |
| "display_name": "py310", | |
| "language": "python", | |
| "name": "py310" | |
| }, | |
| "language_info": { | |
| "codemirror_mode": { | |
| "name": "ipython", | |
| "version": 3 | |
| }, | |
| "file_extension": ".py", | |
| "mimetype": "text/x-python", | |
| "name": "python", | |
| "nbconvert_exporter": "python", | |
| "pygments_lexer": "ipython3", | |
| "version": "3.10.0" | |
| } | |
| }, | |
| "nbformat": 4, | |
| "nbformat_minor": 5 | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment