|
5 | 5 | "execution_count": 1, |
6 | 6 | "id": "e4221445-5518-4984-b731-aaf9840141d8", |
7 | 7 | "metadata": {}, |
8 | | - "outputs": [], |
| 8 | + "outputs": [ |
| 9 | + { |
| 10 | + "name": "stderr", |
| 11 | + "output_type": "stream", |
| 12 | + "text": [ |
| 13 | + "TODO: Probably need --nbval-current-env\n" |
| 14 | + ] |
| 15 | + } |
| 16 | + ], |
9 | 17 | "source": [ |
10 | 18 | "%matplotlib inline\n", |
11 | 19 | "%config InlineBackend.figure_formats = 'jpeg'\n", |
|
16 | 24 | "\n", |
17 | 25 | "import matplotlib.pyplot as plt\n", |
18 | 26 | "from matplotlib_inline.backend_inline import set_matplotlib_formats\n", |
19 | | - "# TODO: --nbval-current-env" |
| 27 | + "from traitlets.config import get_config\n", |
| 28 | + "\n", |
| 29 | + "import sys\n", |
| 30 | + "print(\"TODO: Probably need --nbval-current-env\", file=sys.stderr)" |
20 | 31 | ] |
21 | 32 | }, |
22 | 33 | { |
|
127 | 138 | "metadata": {}, |
128 | 139 | "outputs": [ |
129 | 140 | { |
130 | | - "name": "stdout", |
131 | | - "output_type": "stream", |
132 | | - "text": [ |
133 | | - "{'IPKernelApp': {'connection_file': 'C:\\\\Users\\\\leo\\\\AppData\\\\Roaming\\\\jupyter\\\\runtime\\\\kernel-f8c8036d-dc80-4842-ab30-cb8a4413327d.json'},\n", |
134 | | - " 'InlineBackend': {'figure_formats': {'png', 'jpeg'},\n", |
135 | | - " 'print_figure_kwargs': {'bbox_inches': None,\n", |
136 | | - " 'pil_kwargs': {'quality': 90}}}}\n" |
137 | | - ] |
| 141 | + "data": { |
| 142 | + "text/plain": [ |
| 143 | + "{'IPKernelApp': {'connection_file': '/Users/leo/Library/Jupyter/runtime/kernel-fd702e07-f2dc-45ba-b31a-62608c076402.json'},\n", |
| 144 | + " 'InlineBackend': {'figure_formats': {'jpeg', 'png'},\n", |
| 145 | + " 'print_figure_kwargs': {'bbox_inches': None, 'pil_kwargs': {'quality': 90}}}}" |
| 146 | + ] |
| 147 | + }, |
| 148 | + "execution_count": 5, |
| 149 | + "metadata": {}, |
| 150 | + "output_type": "execute_result" |
138 | 151 | } |
139 | 152 | ], |
140 | 153 | "source": [ |
141 | 154 | "#NBVAL_IGNORE_OUTPUT\n", |
142 | 155 | "# For demonstration purposes only, the Inline Back-end\n", |
143 | 156 | "# configuration does not change.\n", |
144 | | - "try:\n", |
145 | | - " import pprint\n", |
146 | | - " from traitlets.config import get_config\n", |
147 | | - " c = get_config()\n", |
148 | | - " c.InlineBackend.figure_formats = {'png', 'jpeg'}\n", |
149 | | - " c.InlineBackend.print_figure_kwargs.update({\n", |
150 | | - " 'pil_kwargs': {'quality' : 90}\n", |
151 | | - " })\n", |
152 | | - " pprint.pprint(c)\n", |
153 | | - "except ImportError as e:\n", |
154 | | - " print(e)" |
| 157 | + "c = get_config()\n", |
| 158 | + "c.InlineBackend.figure_formats = {'png', 'jpeg'}\n", |
| 159 | + "c.InlineBackend.print_figure_kwargs.update({\n", |
| 160 | + " 'pil_kwargs': {'quality' : 90}\n", |
| 161 | + " })\n", |
| 162 | + "c" |
155 | 163 | ] |
156 | 164 | } |
157 | 165 | ], |
|
0 commit comments