|
12 | 12 | },
|
13 | 13 | {
|
14 | 14 | "cell_type": "code",
|
15 |
| - "execution_count": 1, |
| 15 | + "execution_count": null, |
16 | 16 | "id": "66eaaf8e-3324-4e77-9cc4-f52682c7caea",
|
17 | 17 | "metadata": {
|
18 | 18 | "tags": []
|
|
26 | 26 | },
|
27 | 27 | {
|
28 | 28 | "cell_type": "code",
|
29 |
| - "execution_count": 2, |
| 29 | + "execution_count": null, |
30 | 30 | "id": "e481359b-6b49-40c5-86dd-b1c177314cd6",
|
31 | 31 | "metadata": {
|
32 | 32 | "tags": []
|
33 | 33 | },
|
34 |
| - "outputs": [ |
35 |
| - { |
36 |
| - "data": { |
37 |
| - "application/vnd.jupyter.widget-view+json": { |
38 |
| - "model_id": "d91eb6c3eb7a4a4b9cfc1a20ddb2237b", |
39 |
| - "version_major": 2, |
40 |
| - "version_minor": 0 |
41 |
| - }, |
42 |
| - "text/plain": [ |
43 |
| - "RFBOutputContext()" |
44 |
| - ] |
45 |
| - }, |
46 |
| - "metadata": {}, |
47 |
| - "output_type": "display_data" |
48 |
| - }, |
49 |
| - { |
50 |
| - "name": "stderr", |
51 |
| - "output_type": "stream", |
52 |
| - "text": [ |
53 |
| - "/home/clewis7/repos/fastplotlib/fastplotlib/graphics/_features/_base.py:34: UserWarning: converting float64 array to float32\n", |
54 |
| - " warn(f\"converting {array.dtype} array to float32\")\n" |
55 |
| - ] |
56 |
| - } |
57 |
| - ], |
| 34 | + "outputs": [], |
58 | 35 | "source": [
|
59 | 36 | "# GridPlot of shape 2 x 3 with all controllers synced\n",
|
60 | 37 | "grid_plot = fpl.GridPlot(shape=(2, 3), controllers=\"sync\")\n",
|
|
94 | 71 | },
|
95 | 72 | {
|
96 | 73 | "cell_type": "code",
|
97 |
| - "execution_count": 3, |
| 74 | + "execution_count": null, |
98 | 75 | "id": "ed86a89d-0cb9-44e6-97ac-56499c9a0a2e",
|
99 | 76 | "metadata": {
|
100 | 77 | "tags": []
|
101 | 78 | },
|
102 |
| - "outputs": [ |
103 |
| - { |
104 |
| - "data": { |
105 |
| - "text/plain": [ |
106 |
| - "unnamed: Subplot @ 0x7f684a3c8110\n", |
107 |
| - " parent: fastplotlib.GridPlot @ 0x7f684a483890\n", |
108 |
| - "\n", |
109 |
| - " Graphics:\n", |
110 |
| - "\t'rand-img': ImageGraphic @ 0x7f684a483cd0" |
111 |
| - ] |
112 |
| - }, |
113 |
| - "execution_count": 3, |
114 |
| - "metadata": {}, |
115 |
| - "output_type": "execute_result" |
116 |
| - } |
117 |
| - ], |
| 79 | + "outputs": [], |
118 | 80 | "source": [
|
119 | 81 | "# positional indexing\n",
|
120 | 82 | "# row 0 and col 0\n",
|
|
131 | 93 | },
|
132 | 94 | {
|
133 | 95 | "cell_type": "code",
|
134 |
| - "execution_count": 4, |
| 96 | + "execution_count": null, |
135 | 97 | "id": "bf671e47-70b7-428b-bfca-55123e99344d",
|
136 | 98 | "metadata": {
|
137 | 99 | "tags": []
|
138 | 100 | },
|
139 |
| - "outputs": [ |
140 |
| - { |
141 |
| - "data": { |
142 |
| - "text/plain": [ |
143 |
| - "(<weakproxy at 0x7f67f43d4ea0 to ImageGraphic at 0x7f67f43d8550>,)" |
144 |
| - ] |
145 |
| - }, |
146 |
| - "execution_count": 4, |
147 |
| - "metadata": {}, |
148 |
| - "output_type": "execute_result" |
149 |
| - } |
150 |
| - ], |
| 101 | + "outputs": [], |
151 | 102 | "source": [
|
152 | 103 | "grid_plot[0, 1].graphics"
|
153 | 104 | ]
|
|
162 | 113 | },
|
163 | 114 | {
|
164 | 115 | "cell_type": "code",
|
165 |
| - "execution_count": 5, |
| 116 | + "execution_count": null, |
166 | 117 | "id": "2b9f4996-9321-488c-aa7d-99129a8a0dd0",
|
167 | 118 | "metadata": {
|
168 | 119 | "tags": []
|
|
182 | 133 | },
|
183 | 134 | {
|
184 | 135 | "cell_type": "code",
|
185 |
| - "execution_count": 6, |
| 136 | + "execution_count": null, |
186 | 137 | "id": "fb186973-1ce2-4361-bb97-0f50342f9861",
|
187 | 138 | "metadata": {
|
188 | 139 | "tags": []
|
189 | 140 | },
|
190 | 141 | "outputs": [],
|
191 | 142 | "source": [
|
192 | 143 | "# you can give subplots human-readable string names\n",
|
193 |
| - "grid_plot[0, 2].name = \"top-right-plot\"" |
| 144 | + "grid_plot[0, 2].name = \"top-right\"" |
194 | 145 | ]
|
195 | 146 | },
|
196 | 147 | {
|
197 | 148 | "cell_type": "code",
|
198 |
| - "execution_count": 7, |
| 149 | + "execution_count": null, |
199 | 150 | "id": "403d2d0a-7cbf-4e43-a75a-dfff98d40cf2",
|
200 | 151 | "metadata": {
|
201 | 152 | "tags": []
|
202 | 153 | },
|
203 |
| - "outputs": [ |
204 |
| - { |
205 |
| - "data": { |
206 |
| - "text/plain": [ |
207 |
| - "top-right-plot: Subplot @ 0x7f6844705c10\n", |
208 |
| - " parent: fastplotlib.GridPlot @ 0x7f684a483890\n", |
209 |
| - "\n", |
210 |
| - " Graphics:\n", |
211 |
| - "\t'rand-img': ImageGraphic @ 0x7f67f43da110" |
212 |
| - ] |
213 |
| - }, |
214 |
| - "execution_count": 7, |
215 |
| - "metadata": {}, |
216 |
| - "output_type": "execute_result" |
217 |
| - } |
218 |
| - ], |
| 154 | + "outputs": [], |
219 | 155 | "source": [
|
220 |
| - "grid_plot[\"top-right-plot\"]" |
| 156 | + "grid_plot[\"top-right\"]" |
221 | 157 | ]
|
222 | 158 | },
|
223 | 159 | {
|
224 | 160 | "cell_type": "code",
|
225 |
| - "execution_count": 8, |
| 161 | + "execution_count": null, |
226 | 162 | "id": "4f296891-a8b4-47d1-8d17-7554c36b00ed",
|
227 | 163 | "metadata": {
|
228 | 164 | "tags": []
|
229 | 165 | },
|
230 |
| - "outputs": [ |
231 |
| - { |
232 |
| - "data": { |
233 |
| - "text/plain": [ |
234 |
| - "(0, 2)" |
235 |
| - ] |
236 |
| - }, |
237 |
| - "execution_count": 8, |
238 |
| - "metadata": {}, |
239 |
| - "output_type": "execute_result" |
240 |
| - } |
241 |
| - ], |
| 166 | + "outputs": [], |
242 | 167 | "source": [
|
243 | 168 | "# view its position\n",
|
244 |
| - "grid_plot[\"top-right-plot\"].position" |
| 169 | + "grid_plot[\"top-right\"].position" |
245 | 170 | ]
|
246 | 171 | },
|
247 | 172 | {
|
248 | 173 | "cell_type": "code",
|
249 |
| - "execution_count": 9, |
| 174 | + "execution_count": null, |
250 | 175 | "id": "85f06940-3eec-49e9-97a0-00054ad27d8a",
|
251 | 176 | "metadata": {
|
252 | 177 | "tags": []
|
253 | 178 | },
|
254 |
| - "outputs": [ |
255 |
| - { |
256 |
| - "data": { |
257 |
| - "text/plain": [ |
258 |
| - "True" |
259 |
| - ] |
260 |
| - }, |
261 |
| - "execution_count": 9, |
262 |
| - "metadata": {}, |
263 |
| - "output_type": "execute_result" |
264 |
| - } |
265 |
| - ], |
| 179 | + "outputs": [], |
266 | 180 | "source": [
|
267 | 181 | "# these are really the same\n",
|
268 |
| - "grid_plot[\"top-right-plot\"] is grid_plot[0, 2]" |
| 182 | + "grid_plot[\"top-right\"] is grid_plot[0, 2]" |
269 | 183 | ]
|
270 | 184 | },
|
271 | 185 | {
|
|
278 | 192 | },
|
279 | 193 | {
|
280 | 194 | "cell_type": "code",
|
281 |
| - "execution_count": 10, |
| 195 | + "execution_count": null, |
282 | 196 | "id": "75ecdd19-bd9a-4d93-bb18-a6216e3fde1b",
|
283 | 197 | "metadata": {
|
284 | 198 | "tags": []
|
285 | 199 | },
|
286 | 200 | "outputs": [],
|
287 | 201 | "source": [
|
288 |
| - "grid_plot[\"top-right-plot\"][\"rand-img\"].cmap.vmin = 0.5" |
| 202 | + "grid_plot[\"top-right\"][\"rand-img\"].cmap.vmin = 0.5" |
289 | 203 | ]
|
290 | 204 | },
|
291 | 205 | {
|
292 | 206 | "cell_type": "code",
|
293 |
| - "execution_count": 11, |
| 207 | + "execution_count": null, |
294 | 208 | "id": "4f5f7fab-d7f2-4b6b-8f2d-c0745f9193cb",
|
295 | 209 | "metadata": {
|
296 | 210 | "tags": []
|
297 | 211 | },
|
298 | 212 | "outputs": [],
|
299 | 213 | "source": [
|
| 214 | + "grid_plot.close()\n", |
300 | 215 | "sc.close()"
|
301 | 216 | ]
|
302 | 217 | },
|
|
0 commit comments