-
Notifications
You must be signed in to change notification settings - Fork 60
Expand file tree
/
Copy pathMEP23.html
More file actions
687 lines (618 loc) · 29.7 KB
/
MEP23.html
File metadata and controls
687 lines (618 loc) · 29.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.17.1: http://docutils.sourceforge.net/" />
<title>MEP23: Multiple Figures per GUI window — Matplotlib 3.5.2 documentation</title>
<!-- Loaded before other Sphinx assets -->
<link href="../../_static/styles/theme.css?digest=1999514e3f237ded88cf" rel="stylesheet">
<link href="../../_static/styles/pydata-sphinx-theme.css?digest=1999514e3f237ded88cf" rel="stylesheet">
<link rel="stylesheet"
href="../../_static/vendor/fontawesome/5.13.0/css/all.min.css">
<link rel="preload" as="font" type="font/woff2" crossorigin
href="../../_static/vendor/fontawesome/5.13.0/webfonts/fa-solid-900.woff2">
<link rel="preload" as="font" type="font/woff2" crossorigin
href="../../_static/vendor/fontawesome/5.13.0/webfonts/fa-brands-400.woff2">
<link rel="stylesheet" type="text/css" href="../../_static/pygments.css" />
<link rel="stylesheet" type="text/css" href="../../_static/css/style.css" />
<link rel="stylesheet" type="text/css" href="../../_static/graphviz.css" />
<link rel="stylesheet" type="text/css" href="../../_static/plot_directive.css" />
<link rel="stylesheet" type="text/css" href="../../_static/copybutton.css" />
<link rel="stylesheet" type="text/css" href="../../_static/sg_gallery.css" />
<link rel="stylesheet" type="text/css" href="../../_static/sg_gallery-binder.css" />
<link rel="stylesheet" type="text/css" href="../../_static/sg_gallery-dataframe.css" />
<link rel="stylesheet" type="text/css" href="../../_static/sg_gallery-rendered-html.css" />
<link rel="stylesheet" type="text/css" href="../../_static/panels-main.c949a650a448cc0ae9fd3441c0e17fb0.css" />
<link rel="stylesheet" type="text/css" href="../../_static/panels-variables.06eb56fa6e07937060861dad626602ad.css" />
<link rel="stylesheet" type="text/css" href="../../_static/mpl.css?v3.5.2-3-g2e7af710d5" />
<!-- Pre-loaded scripts that we'll load fully later -->
<link rel="preload" as="script" href="../../_static/scripts/pydata-sphinx-theme.js?digest=1999514e3f237ded88cf">
<script data-url_root="../../" id="documentation_options" src="../../_static/documentation_options.js"></script>
<script src="../../_static/jquery.js"></script>
<script src="../../_static/underscore.js"></script>
<script src="../../_static/doctools.js"></script>
<script src="../../_static/clipboard.min.js"></script>
<script src="../../_static/copybutton.js"></script>
<link rel="canonical" href="https://matplotlib.org/stable/devel/MEP/MEP23.html" />
<link rel="search" type="application/opensearchdescription+xml"
title="Search within Matplotlib 3.5.2 documentation"
href="../../_static/opensearch.xml"/>
<link rel="shortcut icon" href="../../_static/favicon.ico"/>
<link rel="search" title="Search" href="../../search.html" />
<link rel="next" title="MEP24: Negative radius in polar plots" href="MEP24.html" />
<link rel="prev" title="MEP22: Toolbar rewrite" href="MEP22.html" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="docsearch:language" content="None">
<script data-domain="matplotlib.org" defer="defer" src="https://views.scientific-python.org/js/script.js"></script>
</head>
<body data-spy="scroll" data-target="#bd-toc-nav" data-offset="60">
<div class="container-fluid" id="banner"></div>
<nav class="navbar navbar-light navbar-expand-lg bg-light fixed-top bd-navbar" id="navbar-main"><div class="container-xl">
<div id="navbar-start">
<a class="navbar-brand" href="../../index.html">
<img src="../../_static/logo2.svg" class="logo" alt="logo">
</a>
</div>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbar-collapsible" aria-controls="navbar-collapsible" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div id="navbar-collapsible" class="col-lg-9 collapse navbar-collapse">
<div id="navbar-center" class="mr-auto">
<div class="navbar-center-item">
<ul id="navbar-main-elements" class="navbar-nav">
<li class="nav-item">
<a class="reference internal nav-link" href="../../plot_types/index.html">Plot types</a>
</li>
<li class="nav-item">
<a class="reference internal nav-link" href="../../gallery/index.html">Examples</a>
</li>
<li class="nav-item">
<a class="reference internal nav-link" href="../../tutorials/index.html">Tutorials</a>
</li>
<li class="nav-item">
<a class="reference internal nav-link" href="../../api/index.html">Reference</a>
</li>
<li class="nav-item">
<a class="reference internal nav-link" href="../../users/index.html">User guide</a>
</li>
<li class="nav-item">
<a class="reference internal nav-link" href="../index.html">Develop</a>
</li>
<li class="nav-item">
<a class="reference internal nav-link" href="../../users/release_notes.html">Release notes</a>
</li>
</ul>
</div>
</div>
<div id="navbar-end">
<div class="navbar-end-item">
<ul id="navbar-icon-links" class="navbar-nav" aria-label="Icon Links">
<li class="nav-item">
<a class="nav-link" href="https://gitter.im/matplotlib/matplotlib" rel="noopener" target="_blank" title="gitter">
<span><i class="fab fa-gitter"></i></span>
<label class="sr-only">gitter</label>
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="https://discourse.matplotlib.org" rel="noopener" target="_blank" title="discourse">
<span><i class="fab fa-discourse"></i></span>
<label class="sr-only">discourse</label>
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="https://github.com/matplotlib/matplotlib" rel="noopener" target="_blank" title="GitHub">
<span><i class="fab fa-github-square"></i></span>
<label class="sr-only">GitHub</label>
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="https://twitter.com/matplotlib/" rel="noopener" target="_blank" title="twitter">
<span><i class="fab fa-twitter-square"></i></span>
<label class="sr-only">twitter</label>
</a>
</li>
</ul>
</div>
</div>
</div>
</div>
</nav>
<div class="container-xl">
<div class="row">
<!-- Only show if we have sidebars configured, else just a small margin -->
<div class="col-12 col-md-3 bd-sidebar">
<div class="sidebar-start-items"><form class="bd-search d-flex align-items-center" action="../../search.html" method="get">
<i class="icon fas fa-search"></i>
<input type="search" class="form-control" name="q" id="search-input" placeholder="Search the docs ..." aria-label="Search the docs ..." autocomplete="off" >
</form><nav class="bd-links" id="bd-docs-nav" aria-label="Main navigation">
<div class="bd-toc-item active">
<ul class="current nav bd-sidenav">
<li class="toctree-l1">
<a class="reference internal" href="../contributing.html">
Contributing
</a>
</li>
<li class="toctree-l1">
<a class="reference internal" href="../triage.html">
Bug triaging and issue curation
</a>
</li>
<li class="toctree-l1">
<a class="reference internal" href="../development_setup.html">
Setting up Matplotlib for development
</a>
</li>
<li class="toctree-l1">
<a class="reference internal" href="../testing.html">
Testing
</a>
</li>
<li class="toctree-l1">
<a class="reference internal" href="../documenting_mpl.html">
Writing documentation
</a>
</li>
<li class="toctree-l1">
<a class="reference internal" href="../style_guide.html">
Documentation style guide
</a>
</li>
<li class="toctree-l1 has-children">
<a class="reference internal" href="../gitwash/index.html">
Working with
<em>
Matplotlib
</em>
source code
</a>
<input class="toctree-checkbox" id="toctree-checkbox-1" name="toctree-checkbox-1" type="checkbox"/>
<label for="toctree-checkbox-1">
<i class="fas fa-chevron-down">
</i>
</label>
<ul>
<li class="toctree-l2">
<a class="reference internal" href="../gitwash/git_intro.html">
Introduction
</a>
</li>
<li class="toctree-l2">
<a class="reference internal" href="../gitwash/git_install.html">
Install git
</a>
</li>
<li class="toctree-l2">
<a class="reference internal" href="../gitwash/following_latest.html">
Following the latest source
</a>
</li>
<li class="toctree-l2">
<a class="reference internal" href="../gitwash/patching.html">
Making a patch
</a>
</li>
<li class="toctree-l2 has-children">
<a class="reference internal" href="../gitwash/git_development.html">
Git for development
</a>
<input class="toctree-checkbox" id="toctree-checkbox-2" name="toctree-checkbox-2" type="checkbox"/>
<label for="toctree-checkbox-2">
<i class="fas fa-chevron-down">
</i>
</label>
<ul>
<li class="toctree-l3">
<a class="reference internal" href="../gitwash/forking_hell.html">
Making your own copy (fork) of Matplotlib
</a>
</li>
<li class="toctree-l3">
<a class="reference internal" href="../gitwash/set_up_fork.html">
Set up your fork
</a>
</li>
<li class="toctree-l3">
<a class="reference internal" href="../gitwash/configure_git.html">
Configure git
</a>
</li>
<li class="toctree-l3">
<a class="reference internal" href="../gitwash/development_workflow.html">
Development workflow
</a>
</li>
<li class="toctree-l3">
<a class="reference internal" href="../gitwash/maintainer_workflow.html">
Maintainer workflow
</a>
</li>
</ul>
</li>
<li class="toctree-l2">
<a class="reference internal" href="../gitwash/git_resources.html">
git resources
</a>
</li>
<li class="toctree-l2">
<a class="reference internal" href="../gitwash/dot2_dot3.html">
Two and three dots in difference specs
</a>
</li>
</ul>
</li>
<li class="toctree-l1">
<a class="reference internal" href="../coding_guide.html">
Pull request guidelines
</a>
</li>
<li class="toctree-l1">
<a class="reference internal" href="../release_guide.html">
Release guide
</a>
</li>
<li class="toctree-l1">
<a class="reference internal" href="../dependencies.html">
Dependencies
</a>
</li>
<li class="toctree-l1">
<a class="reference internal" href="../min_dep_policy.html">
Minimum version of dependencies policy
</a>
</li>
<li class="toctree-l1 current active has-children">
<a class="reference internal" href="index.html">
Matplotlib Enhancement Proposals
</a>
<input checked="" class="toctree-checkbox" id="toctree-checkbox-3" name="toctree-checkbox-3" type="checkbox"/>
<label for="toctree-checkbox-3">
<i class="fas fa-chevron-down">
</i>
</label>
<ul class="current">
<li class="toctree-l2">
<a class="reference internal" href="template.html">
MEP Template
</a>
</li>
<li class="toctree-l2">
<a class="reference internal" href="MEP08.html">
MEP8: PEP8
</a>
</li>
<li class="toctree-l2">
<a class="reference internal" href="MEP09.html">
MEP9: Global interaction manager
</a>
</li>
<li class="toctree-l2">
<a class="reference internal" href="MEP10.html">
MEP10: Docstring consistency
</a>
</li>
<li class="toctree-l2">
<a class="reference internal" href="MEP11.html">
MEP11: Third-party dependencies
</a>
</li>
<li class="toctree-l2">
<a class="reference internal" href="MEP12.html">
MEP12: Improve Gallery and Examples
</a>
</li>
<li class="toctree-l2">
<a class="reference internal" href="MEP13.html">
MEP13: Use properties for Artists
</a>
</li>
<li class="toctree-l2">
<a class="reference internal" href="MEP14.html">
MEP14: Text handling
</a>
</li>
<li class="toctree-l2">
<a class="reference internal" href="MEP15.html">
MEP15: Fix axis autoscaling when limits are specified for one axis only
</a>
</li>
<li class="toctree-l2">
<a class="reference internal" href="MEP19.html">
MEP19: Continuous Integration
</a>
</li>
<li class="toctree-l2">
<a class="reference internal" href="MEP21.html">
MEP21: color and cm refactor
</a>
</li>
<li class="toctree-l2">
<a class="reference internal" href="MEP22.html">
MEP22: Toolbar rewrite
</a>
</li>
<li class="toctree-l2 current active">
<a class="current reference internal" href="#">
MEP23: Multiple Figures per GUI window
</a>
</li>
<li class="toctree-l2">
<a class="reference internal" href="MEP24.html">
MEP24: Negative radius in polar plots
</a>
</li>
<li class="toctree-l2">
<a class="reference internal" href="MEP25.html">
MEP25: Serialization
</a>
</li>
<li class="toctree-l2">
<a class="reference internal" href="MEP26.html">
MEP26: Artist styling
</a>
</li>
<li class="toctree-l2">
<a class="reference internal" href="MEP27.html">
MEP27: Decouple pyplot from backends
</a>
</li>
<li class="toctree-l2">
<a class="reference internal" href="MEP28.html">
MEP28: Remove Complexity from Axes.boxplot
</a>
</li>
<li class="toctree-l2">
<a class="reference internal" href="MEP29.html">
MEP29: Text light markup
</a>
</li>
</ul>
</li>
</ul>
<ul class="nav bd-sidenav">
<li class="toctree-l1">
<a class="reference internal" href="../license.html">
Licenses
</a>
</li>
<li class="toctree-l1">
<a class="reference internal" href="../color_changes.html">
Default color changes
</a>
</li>
</ul>
</div>
</nav>
</div>
<div class="sidebar-end-items">
</div>
</div>
<div class="d-none d-xl-block col-xl-2 bd-toc">
<div class="toc-item">
<div class="tocsection onthispage mt-5 pt-1 pb-3">
<i class="fas fa-list"></i> On this page
</div>
<nav id="bd-toc-nav">
<ul class="visible nav section-nav flex-column">
<li class="toc-h2 nav-item toc-entry">
<a class="reference internal nav-link" href="#status">
Status
</a>
</li>
<li class="toc-h2 nav-item toc-entry">
<a class="reference internal nav-link" href="#branches-and-pull-requests">
Branches and Pull requests
</a>
</li>
<li class="toc-h2 nav-item toc-entry">
<a class="reference internal nav-link" href="#abstract">
Abstract
</a>
</li>
<li class="toc-h2 nav-item toc-entry">
<a class="reference internal nav-link" href="#detailed-description">
Detailed description
</a>
</li>
<li class="toc-h2 nav-item toc-entry">
<a class="reference internal nav-link" href="#implementation">
Implementation
</a>
<ul class="nav section-nav flex-column">
<li class="toc-h3 nav-item toc-entry">
<a class="reference internal nav-link" href="#figuremanagerbase">
<code class="docutils literal notranslate">
<span class="pre">
FigureManagerBase
</span>
</code>
</a>
</li>
<li class="toc-h3 nav-item toc-entry">
<a class="reference internal nav-link" href="#new-figure-manager">
<code class="docutils literal notranslate">
<span class="pre">
new_figure_manager
</span>
</code>
</a>
</li>
<li class="toc-h3 nav-item toc-entry">
<a class="reference internal nav-link" href="#new-figure-manager-given-figure">
<code class="docutils literal notranslate">
<span class="pre">
new_figure_manager_given_figure
</span>
</code>
</a>
</li>
<li class="toc-h3 nav-item toc-entry">
<a class="reference internal nav-link" href="#navigationbase">
<code class="docutils literal notranslate">
<span class="pre">
NavigationBase
</span>
</code>
</a>
</li>
</ul>
</li>
<li class="toc-h2 nav-item toc-entry">
<a class="reference internal nav-link" href="#backward-compatibility">
Backward compatibility
</a>
</li>
<li class="toc-h2 nav-item toc-entry">
<a class="reference internal nav-link" href="#alternatives">
Alternatives
</a>
</li>
</ul>
</nav>
</div>
<div class="toc-item">
</div>
</div>
<main class="col-12 col-md-9 col-xl-7 py-md-5 pl-md-5 pr-md-4 bd-content" role="main">
<div>
<section id="mep23-multiple-figures-per-gui-window">
<h1>MEP23: Multiple Figures per GUI window<a class="headerlink" href="#mep23-multiple-figures-per-gui-window" title="Permalink to this headline">#</a></h1>
<div class="contents local topic" id="contents">
<ul class="simple">
<li><p><a class="reference internal" href="#status" id="id1">Status</a></p></li>
<li><p><a class="reference internal" href="#branches-and-pull-requests" id="id2">Branches and Pull requests</a></p></li>
<li><p><a class="reference internal" href="#abstract" id="id3">Abstract</a></p></li>
<li><p><a class="reference internal" href="#detailed-description" id="id4">Detailed description</a></p></li>
<li><p><a class="reference internal" href="#implementation" id="id5">Implementation</a></p>
<ul>
<li><p><a class="reference internal" href="#figuremanagerbase" id="id6"><code class="docutils literal notranslate"><span class="pre">FigureManagerBase</span></code></a></p></li>
<li><p><a class="reference internal" href="#new-figure-manager" id="id7"><code class="docutils literal notranslate"><span class="pre">new_figure_manager</span></code></a></p></li>
<li><p><a class="reference internal" href="#new-figure-manager-given-figure" id="id8"><code class="docutils literal notranslate"><span class="pre">new_figure_manager_given_figure</span></code></a></p></li>
<li><p><a class="reference internal" href="#navigationbase" id="id9"><code class="docutils literal notranslate"><span class="pre">NavigationBase</span></code></a></p></li>
</ul>
</li>
<li><p><a class="reference internal" href="#backward-compatibility" id="id10">Backward compatibility</a></p></li>
<li><p><a class="reference internal" href="#alternatives" id="id11">Alternatives</a></p></li>
</ul>
</div>
<section id="status">
<h2><a class="toc-backref" href="#id1">Status</a><a class="headerlink" href="#status" title="Permalink to this headline">#</a></h2>
<p><strong>Discussion</strong></p>
</section>
<section id="branches-and-pull-requests">
<h2><a class="toc-backref" href="#id2">Branches and Pull requests</a><a class="headerlink" href="#branches-and-pull-requests" title="Permalink to this headline">#</a></h2>
<p><strong>Previous work</strong>
- <a class="reference external" href="https://github.com/matplotlib/matplotlib/pull/2465">https://github.com/matplotlib/matplotlib/pull/2465</a> <strong>To-delete</strong></p>
</section>
<section id="abstract">
<h2><a class="toc-backref" href="#id3">Abstract</a><a class="headerlink" href="#abstract" title="Permalink to this headline">#</a></h2>
<p>Add the possibility to have multiple figures grouped under the same
<a class="reference internal" href="../../api/backend_template_api.html#matplotlib.backends.backend_template.FigureManager" title="matplotlib.backends.backend_template.FigureManager"><code class="xref py py-obj docutils literal notranslate"><span class="pre">FigureManager</span></code></a></p>
</section>
<section id="detailed-description">
<h2><a class="toc-backref" href="#id4">Detailed description</a><a class="headerlink" href="#detailed-description" title="Permalink to this headline">#</a></h2>
<p>Under the current structure, every canvas has its own window.</p>
<p>This is and may continue to be the desired method of operation for
most use cases.</p>
<p>Sometimes when there are too many figures open at the same time, it is
desirable to be able to group these under the same window
[see](<a class="reference external" href="https://github.com/matplotlib/matplotlib/issues/2194">https://github.com/matplotlib/matplotlib/issues/2194</a>).</p>
<p>The proposed solution modifies <a class="reference internal" href="../../api/backend_bases_api.html#matplotlib.backend_bases.FigureManagerBase" title="matplotlib.backend_bases.FigureManagerBase"><code class="xref py py-obj docutils literal notranslate"><span class="pre">FigureManagerBase</span></code></a> to contain and manage more
than one <code class="docutils literal notranslate"><span class="pre">Canvas</span></code>. The settings parameter <code class="docutils literal notranslate"><a class="reference external" href="../../tutorials/introductory/customizing.html?highlight=backend.multifigure#a-sample-matplotlibrc-file"><span class="pre">rcParams["backend.multifigure"]</span></a></code> control
when the <strong>MultiFigure</strong> behaviour is desired.</p>
<p><strong>Note</strong></p>
<p>It is important to note, that the proposed solution, assumes that the
[MEP22](<a class="reference external" href="https://github.com/matplotlib/matplotlib/wiki/Mep22">https://github.com/matplotlib/matplotlib/wiki/Mep22</a>) is
already in place. This is simply because the actual implementation of
the <code class="docutils literal notranslate"><span class="pre">Toolbar</span></code> makes it pretty hard to switch between canvases.</p>
</section>
<section id="implementation">
<h2><a class="toc-backref" href="#id5">Implementation</a><a class="headerlink" href="#implementation" title="Permalink to this headline">#</a></h2>
<p>The first implementation will be done in GTK3 using a Notebook as
canvas container.</p>
<section id="figuremanagerbase">
<h3><a class="toc-backref" href="#id6"><code class="docutils literal notranslate"><span class="pre">FigureManagerBase</span></code></a><a class="headerlink" href="#figuremanagerbase" title="Permalink to this headline">#</a></h3>
<p>will add the following new methods</p>
<ul class="simple">
<li><p><code class="docutils literal notranslate"><span class="pre">add_canvas</span></code>: To add a canvas to an existing
<a class="reference internal" href="../../api/backend_template_api.html#matplotlib.backends.backend_template.FigureManager" title="matplotlib.backends.backend_template.FigureManager"><code class="xref py py-obj docutils literal notranslate"><span class="pre">FigureManager</span></code></a> object</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">remove_canvas</span></code>: To remove a canvas from a
<a class="reference internal" href="../../api/backend_template_api.html#matplotlib.backends.backend_template.FigureManager" title="matplotlib.backends.backend_template.FigureManager"><code class="xref py py-obj docutils literal notranslate"><span class="pre">FigureManager</span></code></a> object, if it is the last one, it will be
destroyed</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">move_canvas</span></code>: To move a canvas from one <a class="reference internal" href="../../api/backend_template_api.html#matplotlib.backends.backend_template.FigureManager" title="matplotlib.backends.backend_template.FigureManager"><code class="xref py py-obj docutils literal notranslate"><span class="pre">FigureManager</span></code></a>
to another.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">set_canvas_title</span></code>: To change the title associated with a specific
canvas container</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">get_canvas_title</span></code>: To get the title associated with a specific
canvas container</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">get_active_canvas</span></code>: To get the canvas that is in the foreground and
is subject to the gui events. There is no <code class="docutils literal notranslate"><span class="pre">set_active_canvas</span></code>
because the active canvas, is defined when <code class="docutils literal notranslate"><span class="pre">show</span></code> is called on a
<code class="docutils literal notranslate"><span class="pre">Canvas</span></code> object.</p></li>
</ul>
</section>
<section id="new-figure-manager">
<h3><a class="toc-backref" href="#id7"><code class="docutils literal notranslate"><span class="pre">new_figure_manager</span></code></a><a class="headerlink" href="#new-figure-manager" title="Permalink to this headline">#</a></h3>
<p>To control which <a class="reference internal" href="../../api/backend_template_api.html#matplotlib.backends.backend_template.FigureManager" title="matplotlib.backends.backend_template.FigureManager"><code class="xref py py-obj docutils literal notranslate"><span class="pre">FigureManager</span></code></a> will contain the new
figures, an extra optional parameter <em>figuremanager</em> will be added, this
parameter value will be passed to <code class="docutils literal notranslate"><span class="pre">new_figure_manager_given_figure</span></code>.</p>
</section>
<section id="new-figure-manager-given-figure">
<h3><a class="toc-backref" href="#id8"><code class="docutils literal notranslate"><span class="pre">new_figure_manager_given_figure</span></code></a><a class="headerlink" href="#new-figure-manager-given-figure" title="Permalink to this headline">#</a></h3>
<ul class="simple">
<li><p>If <em>figuremanager</em> parameter is given, this
<a class="reference internal" href="../../api/backend_template_api.html#matplotlib.backends.backend_template.FigureManager" title="matplotlib.backends.backend_template.FigureManager"><code class="xref py py-obj docutils literal notranslate"><span class="pre">FigureManager</span></code></a> object will be used instead of creating a
new one.</p></li>
<li><p>If <code class="docutils literal notranslate"><span class="pre">rcParams['backend.multifigure']</span></code> is True: The last
<a class="reference internal" href="../../api/backend_template_api.html#matplotlib.backends.backend_template.FigureManager" title="matplotlib.backends.backend_template.FigureManager"><code class="xref py py-obj docutils literal notranslate"><span class="pre">FigureManager</span></code></a> object will be used instead of creating a
new one.</p></li>
</ul>
</section>
<section id="navigationbase">
<h3><a class="toc-backref" href="#id9"><code class="docutils literal notranslate"><span class="pre">NavigationBase</span></code></a><a class="headerlink" href="#navigationbase" title="Permalink to this headline">#</a></h3>
<p>Modifies the <code class="docutils literal notranslate"><span class="pre">NavigationBase</span></code> to keep a list of canvases, directing the
actions to the active one.</p>
</section>
</section>
<section id="backward-compatibility">
<h2><a class="toc-backref" href="#id10">Backward compatibility</a><a class="headerlink" href="#backward-compatibility" title="Permalink to this headline">#</a></h2>
<p>For the <strong>MultiFigure</strong> properties to be visible, the user has to
activate them directly setting <code class="docutils literal notranslate"><span class="pre">rcParams['backend.multifigure']</span> <span class="pre">=</span>
<span class="pre">True</span></code></p>
<p>It should be backwards compatible for backends that adhere to the
current <a class="reference internal" href="../../api/backend_bases_api.html#matplotlib.backend_bases.FigureManagerBase" title="matplotlib.backend_bases.FigureManagerBase"><code class="xref py py-obj docutils literal notranslate"><span class="pre">FigureManagerBase</span></code></a> structure even if they have not
implemented the <strong>MultiFigure</strong> magic yet.</p>
</section>
<section id="alternatives">
<h2><a class="toc-backref" href="#id11">Alternatives</a><a class="headerlink" href="#alternatives" title="Permalink to this headline">#</a></h2>
<p>Instead of modifying the <a class="reference internal" href="../../api/backend_bases_api.html#matplotlib.backend_bases.FigureManagerBase" title="matplotlib.backend_bases.FigureManagerBase"><code class="xref py py-obj docutils literal notranslate"><span class="pre">FigureManagerBase</span></code></a> it could be possible to add
a parallel class, that handles the cases where
<code class="docutils literal notranslate"><span class="pre">rcParams['backend.multifigure']</span> <span class="pre">=</span> <span class="pre">True</span></code>. This will warranty that
there won't be any problems with custom made backends, but also makes
bigger the code, and more things to maintain.</p>
</section>
</section>
</div>
</main>
</div>
</div>
<!-- Scripts loaded after <body> so the DOM is not blocked -->
<div id="unreleased-message"> You are reading an old version of the documentation (v3.5.2). For the latest version see <a href="https://matplotlib.org/stable/devel/MEP/MEP23.html">https://matplotlib.org/stable/devel/MEP/MEP23.html</a></div>
<script src="../../_static/scripts/pydata-sphinx-theme.js?digest=1999514e3f237ded88cf"></script>
<footer class="footer mt-5 mt-md-0">
<div class="container">
<div class="footer-item">
<p class="copyright">
© Copyright 2002 - 2012 John Hunter, Darren Dale, Eric Firing, Michael Droettboom and the Matplotlib development team; 2012 - 2022 The Matplotlib development team.<br>
</p>
</div>
<div class="footer-item">
<p class="sphinx-version">
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 4.5.0.<br>
</p>
</div>
</div>
</footer>
</body>
</html>