-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathframework.html
More file actions
744 lines (698 loc) · 79.3 KB
/
Copy pathframework.html
File metadata and controls
744 lines (698 loc) · 79.3 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
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
<!DOCTYPE html>
<html class="writer-html5" lang="en" data-content_root="../">
<head>
<meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>The psyplot framework — psyplot documentation</title>
<link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=80d5e7a1" />
<link rel="stylesheet" type="text/css" href="../_static/css/theme.css?v=19f00094" />
<link rel="stylesheet" type="text/css" href="../_static/nc-table-styles.css?v=d585f46f" />
<link rel="stylesheet" type="text/css" href="../_static/plot_directive.css" />
<link rel="stylesheet" type="text/css" href="../_static/sphinx-design.min.css?v=87e54e7c" />
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.1.1/css/all.min.css" />
<link rel="shortcut icon" href="../_static/psyplot.ico"/>
<!--[if lt IE 9]>
<script src="../_static/js/html5shiv.min.js"></script>
<![endif]-->
<script src="../_static/jquery.js?v=5d32c60e"></script>
<script src="../_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
<script src="../_static/documentation_options.js?v=5929fcd5"></script>
<script src="../_static/doctools.js?v=9a2dae69"></script>
<script src="../_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="../_static/design-tabs.js?v=f930bc37"></script>
<script src="../_static/js/theme.js"></script>
<link rel="author" title="About these documents" href="../about.html" />
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="next" title="How to implement your own plotters and plugins" href="plugins_guide.html" />
<link rel="prev" title="Developers guide" href="index.html" />
</head>
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" >
<a href="../index.html" class="icon icon-home">
psyplot
<img src="../_static/psyplot.png" class="logo" alt="Logo"/>
</a>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../search.html" method="get">
<input type="text" name="q" placeholder="Search docs" aria-label="Search docs" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../about.html">About psyplot</a><ul>
<li class="toctree-l2"><a class="reference internal" href="../about.html#why-psyplot">Why psyplot?</a></li>
<li class="toctree-l2"><a class="reference internal" href="../about.html#what-it-is-and-what-it-is-not">What it is, and what it is not</a><ul>
<li class="toctree-l3"><a class="reference internal" href="../about.html#what-it-is">What it is</a></li>
<li class="toctree-l3"><a class="reference internal" href="../about.html#what-it-is-not">What it is not</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../about.html#about-the-author">About the author</a></li>
<li class="toctree-l2"><a class="reference internal" href="../about.html#license">License</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../installing.html">Installation</a><ul>
<li class="toctree-l2"><a class="reference internal" href="../installing.html#how-to-install">How to install</a><ul>
<li class="toctree-l3"><a class="reference internal" href="../installing.html#installation-using-conda">Installation using conda</a></li>
<li class="toctree-l3"><a class="reference internal" href="../installing.html#installation-using-pip">Installation using pip</a></li>
<li class="toctree-l3"><a class="reference internal" href="../installing.html#installation-from-source">Installation from source</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../installing.html#dependencies">Dependencies</a><ul>
<li class="toctree-l3"><a class="reference internal" href="../installing.html#required-dependencies">Required dependencies</a></li>
<li class="toctree-l3"><a class="reference internal" href="../installing.html#optional-dependencies">Optional dependencies</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../installing.html#running-the-tests">Running the tests</a></li>
<li class="toctree-l2"><a class="reference internal" href="../installing.html#building-the-docs">Building the docs</a></li>
<li class="toctree-l2"><a class="reference internal" href="../installing.html#uninstallation">Uninstallation</a><ul>
<li class="toctree-l3"><a class="reference internal" href="../installing.html#uninstallation-via-conda">Uninstallation via conda</a></li>
<li class="toctree-l3"><a class="reference internal" href="../installing.html#uninstallation-via-pip">Uninstallation via pip</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../getting_started.html">Getting started</a><ul>
<li class="toctree-l2"><a class="reference internal" href="../getting_started.html#initialization-and-interactive-usage">Initialization and interactive usage</a></li>
<li class="toctree-l2"><a class="reference internal" href="../getting_started.html#choosing-the-dimension">Choosing the dimension</a></li>
<li class="toctree-l2"><a class="reference internal" href="../getting_started.html#configuring-the-appearance-of-the-plot">Configuring the appearance of the plot</a></li>
<li class="toctree-l2"><a class="reference internal" href="../getting_started.html#controlling-the-update">Controlling the update</a><ul>
<li class="toctree-l3"><a class="reference internal" href="../getting_started.html#automatic-update">Automatic update</a></li>
<li class="toctree-l3"><a class="reference internal" href="../getting_started.html#direct-control-on-formatoption-update">Direct control on formatoption update</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../getting_started.html#creating-and-managing-multiple-plots">Creating and managing multiple plots</a><ul>
<li class="toctree-l3"><a class="reference internal" href="../getting_started.html#creating-multiple-plots">Creating multiple plots</a></li>
<li class="toctree-l3"><a class="reference internal" href="../getting_started.html#slicing-and-filtering-the-project">Slicing and filtering the project</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../getting_started.html#saving-and-loading-your-project">Saving and loading your project</a></li>
<li class="toctree-l2"><a class="reference internal" href="../getting_started.html#using-presets">Using presets</a></li>
<li class="toctree-l2"><a class="reference internal" href="../getting_started.html#adding-your-own-script-the-post-formatoption">Adding your own script: The <code class="xref py py-attr docutils literal notranslate"><span class="pre">post</span></code> formatoption</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference external" href="https://psyplot.github.io/examples/">Example Gallery</a></li>
<li class="toctree-l1"><a class="reference internal" href="../configuration.html">Configuration</a><ul>
<li class="toctree-l2"><a class="reference internal" href="../configuration.html#the-rcparams">The <code class="docutils literal notranslate"><span class="pre">rcParams</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="../configuration.html#default-formatoptions">Default formatoptions</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../projects.html">Subprojects</a></li>
<li class="toctree-l1"><a class="reference internal" href="../accessors.html">xarray Accessors</a><ul>
<li class="toctree-l2"><a class="reference internal" href="../accessors.html#the-datasetaccessor-dataset-accessor">The <code class="xref py py-class docutils literal notranslate"><span class="pre">DatasetAccessor</span></code> dataset accessor</a></li>
<li class="toctree-l2"><a class="reference internal" href="../accessors.html#the-interactivearray-dataarray-accessor">The <code class="xref py py-class docutils literal notranslate"><span class="pre">InteractiveArray</span></code> dataarray accessor</a><ul>
<li class="toctree-l3"><a class="reference internal" href="../accessors.html#creating-plots-with-the-dataarray-accessor">Creating plots with the dataarray accessor</a></li>
<li class="toctree-l3"><a class="reference internal" href="../accessors.html#updating-plots-and-arrays-with-the-dataarray-accessor">Updating plots and arrays with the dataarray accessor</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../plugins.html">Psyplot plugins</a><ul>
<li class="toctree-l2"><a class="reference internal" href="../plugins.html#existing-plugins">Existing plugins</a></li>
<li class="toctree-l2"><a class="reference internal" href="../plugins.html#how-to-exclude-plugins">How to exclude plugins</a><ul>
<li class="toctree-l3"><a class="reference internal" href="../plugins.html#the-psyplot-plugins-environment-variable">The <code class="docutils literal notranslate"><span class="pre">PSYPLOT_PLUGINS</span></code> environment variable</a></li>
<li class="toctree-l3"><a class="reference internal" href="../plugins.html#the-psyplot-plotmethods-environment-variable">The <code class="docutils literal notranslate"><span class="pre">PSYPLOT_PLOTMETHODS</span></code> environment variable</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../command_line.html">Command line usage</a><ul>
<li class="toctree-l2"><a class="reference internal" href="../command_line.html#positional-arguments">Positional Arguments</a></li>
<li class="toctree-l2"><a class="reference internal" href="../command_line.html#named-arguments">Named Arguments</a></li>
<li class="toctree-l2"><a class="reference internal" href="../command_line.html#info-options">Info options</a></li>
<li class="toctree-l2"><a class="reference internal" href="../command_line.html#output-options">Output options</a></li>
</ul>
</li>
<li class="toctree-l1 current"><a class="reference internal" href="index.html">Developers guide</a><ul class="current">
<li class="toctree-l2 current"><a class="current reference internal" href="#">The psyplot framework</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#the-project-function">The <code class="xref py py-func docutils literal notranslate"><span class="pre">project()</span></code> function</a></li>
<li class="toctree-l3"><a class="reference internal" href="#the-interactivebase-and-the-plotter-classes">The <code class="xref py py-class docutils literal notranslate"><span class="pre">InteractiveBase</span></code> and the <code class="xref py py-class docutils literal notranslate"><span class="pre">Plotter</span></code> classes</a><ul>
<li class="toctree-l4"><a class="reference internal" href="#interactive-data-objects">Interactive data objects</a></li>
<li class="toctree-l4"><a class="reference internal" href="#visualization-objects">Visualization objects</a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="#formatoptions">Formatoptions</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="plugins_guide.html">How to implement your own plotters and plugins</a><ul>
<li class="toctree-l3"><a class="reference internal" href="plugins_guide.html#creating-plotters">Creating plotters</a><ul>
<li class="toctree-l4"><a class="reference internal" href="plugins_guide.html#interface-for-the-plotter">Interface for the plotter</a></li>
<li class="toctree-l4"><a class="reference internal" href="plugins_guide.html#interface-to-the-data">Interface to the data</a></li>
<li class="toctree-l4"><a class="reference internal" href="plugins_guide.html#interfacing-to-other-formatoptions">Interfacing to other formatoptions</a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="plugins_guide.html#creating-new-plugins">Creating new plugins</a><ul>
<li class="toctree-l4"><a class="reference internal" href="plugins_guide.html#creating-a-package-with-the-psyplot-plugin-template">Creating a package with the psyplot-plugin-template</a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="plugins_guide.html#rcparams-handling-in-plugins"><code class="docutils literal notranslate"><span class="pre">rcParams</span></code> handling in plugins</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../contributing.html">Contribution and development hints</a><ul>
<li class="toctree-l2"><a class="reference internal" href="../contributing.html#code-of-conduct">Code of Conduct</a></li>
<li class="toctree-l2"><a class="reference internal" href="../contributing.html#what-should-i-know-before-i-get-started">What should I know before I get started?</a><ul>
<li class="toctree-l3"><a class="reference internal" href="../contributing.html#the-psyplot-framework">The psyplot framework</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../contributing.html#contributing-in-the-development">Contributing in the development</a></li>
<li class="toctree-l2"><a class="reference internal" href="../contributing.html#helpers">Helpers</a><ul>
<li class="toctree-l3"><a class="reference internal" href="../contributing.html#shortcuts-with-make">Shortcuts with make</a></li>
<li class="toctree-l3"><a class="reference internal" href="../contributing.html#annotating-licenses">Annotating licenses</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../contributing.html#fixing-the-docs">Fixing the docs</a></li>
<li class="toctree-l2"><a class="reference internal" href="../contributing.html#contributing-to-the-code">Contributing to the code</a></li>
<li class="toctree-l2"><a class="reference internal" href="../contributing.html#updating-the-skeleton-for-this-package">Updating the skeleton for this package</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../api.html">API Reference</a><ul>
<li class="toctree-l2"><a class="reference internal" href="../api/psyplot.html">psyplot package</a><ul>
<li class="toctree-l3"><a class="reference internal" href="../api/psyplot.html#psyplot.get_versions"><code class="docutils literal notranslate"><span class="pre">get_versions()</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="../api/psyplot.html#psyplot.with_gui"><code class="docutils literal notranslate"><span class="pre">with_gui</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="../api/psyplot.html#subpackages">Subpackages</a><ul>
<li class="toctree-l4"><a class="reference internal" href="../api/psyplot.config.html">psyplot.config package</a></li>
<li class="toctree-l4"><a class="reference internal" href="../api/psyplot.sphinxext.html">psyplot.sphinxext package</a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="../api/psyplot.html#submodules">Submodules</a><ul>
<li class="toctree-l4"><a class="reference internal" href="../api/psyplot.data.html"><code class="docutils literal notranslate"><span class="pre">AbsoluteTimeDecoder</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="../api/psyplot.data.html#psyplot.data.AbsoluteTimeEncoder"><code class="docutils literal notranslate"><span class="pre">AbsoluteTimeEncoder</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="../api/psyplot.data.html#psyplot.data.ArrayList"><code class="docutils literal notranslate"><span class="pre">ArrayList</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="../api/psyplot.data.html#psyplot.data.CFDecoder"><code class="docutils literal notranslate"><span class="pre">CFDecoder</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="../api/psyplot.data.html#psyplot.data.DatasetAccessor"><code class="docutils literal notranslate"><span class="pre">DatasetAccessor</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="../api/psyplot.data.html#psyplot.data.InteractiveArray"><code class="docutils literal notranslate"><span class="pre">InteractiveArray</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="../api/psyplot.data.html#psyplot.data.InteractiveBase"><code class="docutils literal notranslate"><span class="pre">InteractiveBase</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="../api/psyplot.data.html#psyplot.data.InteractiveList"><code class="docutils literal notranslate"><span class="pre">InteractiveList</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="../api/psyplot.data.html#psyplot.data.Signal"><code class="docutils literal notranslate"><span class="pre">Signal</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="../api/psyplot.data.html#psyplot.data.UGridDecoder"><code class="docutils literal notranslate"><span class="pre">UGridDecoder</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="../api/psyplot.data.html#psyplot.data.decode_absolute_time"><code class="docutils literal notranslate"><span class="pre">decode_absolute_time()</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="../api/psyplot.data.html#psyplot.data.encode_absolute_time"><code class="docutils literal notranslate"><span class="pre">encode_absolute_time()</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="../api/psyplot.data.html#psyplot.data.get_filename_ds"><code class="docutils literal notranslate"><span class="pre">get_filename_ds()</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="../api/psyplot.data.html#psyplot.data.get_fname_funcs"><code class="docutils literal notranslate"><span class="pre">get_fname_funcs</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="../api/psyplot.data.html#psyplot.data.get_index_from_coord"><code class="docutils literal notranslate"><span class="pre">get_index_from_coord()</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="../api/psyplot.data.html#psyplot.data.get_tdata"><code class="docutils literal notranslate"><span class="pre">get_tdata()</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="../api/psyplot.data.html#psyplot.data.open_dataset"><code class="docutils literal notranslate"><span class="pre">open_dataset()</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="../api/psyplot.data.html#psyplot.data.open_mfdataset"><code class="docutils literal notranslate"><span class="pre">open_mfdataset()</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="../api/psyplot.data.html#psyplot.data.setup_coords"><code class="docutils literal notranslate"><span class="pre">setup_coords()</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="../api/psyplot.data.html#psyplot.data.t_patterns"><code class="docutils literal notranslate"><span class="pre">t_patterns</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="../api/psyplot.data.html#psyplot.data.to_netcdf"><code class="docutils literal notranslate"><span class="pre">to_netcdf()</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="../api/psyplot.data.html#psyplot.data.to_slice"><code class="docutils literal notranslate"><span class="pre">to_slice()</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="../api/psyplot.docstring.html"><code class="docutils literal notranslate"><span class="pre">PsyplotDocstringProcessor</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="../api/psyplot.docstring.html#psyplot.docstring.append_original_doc"><code class="docutils literal notranslate"><span class="pre">append_original_doc()</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="../api/psyplot.docstring.html#psyplot.docstring.dedent"><code class="docutils literal notranslate"><span class="pre">dedent()</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="../api/psyplot.docstring.html#psyplot.docstring.docstrings"><code class="docutils literal notranslate"><span class="pre">docstrings</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="../api/psyplot.docstring.html#psyplot.docstring.indent"><code class="docutils literal notranslate"><span class="pre">indent()</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="../api/psyplot.gdal_store.html"><code class="docutils literal notranslate"><span class="pre">GdalStore</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="../api/psyplot.plotter.html"><code class="docutils literal notranslate"><span class="pre">BEFOREPLOTTING</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="../api/psyplot.plotter.html#psyplot.plotter.DictFormatoption"><code class="docutils literal notranslate"><span class="pre">DictFormatoption</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="../api/psyplot.plotter.html#psyplot.plotter.END"><code class="docutils literal notranslate"><span class="pre">END</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="../api/psyplot.plotter.html#psyplot.plotter.Formatoption"><code class="docutils literal notranslate"><span class="pre">Formatoption</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="../api/psyplot.plotter.html#psyplot.plotter.FormatoptionMeta"><code class="docutils literal notranslate"><span class="pre">FormatoptionMeta</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="../api/psyplot.plotter.html#psyplot.plotter.Plotter"><code class="docutils literal notranslate"><span class="pre">Plotter</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="../api/psyplot.plotter.html#psyplot.plotter.PostProcDependencies"><code class="docutils literal notranslate"><span class="pre">PostProcDependencies</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="../api/psyplot.plotter.html#psyplot.plotter.PostProcessing"><code class="docutils literal notranslate"><span class="pre">PostProcessing</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="../api/psyplot.plotter.html#psyplot.plotter.PostTiming"><code class="docutils literal notranslate"><span class="pre">PostTiming</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="../api/psyplot.plotter.html#psyplot.plotter.START"><code class="docutils literal notranslate"><span class="pre">START</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="../api/psyplot.plotter.html#psyplot.plotter.default_print_func"><code class="docutils literal notranslate"><span class="pre">default_print_func()</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="../api/psyplot.plotter.html#psyplot.plotter.format_time"><code class="docutils literal notranslate"><span class="pre">format_time()</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="../api/psyplot.plotter.html#psyplot.plotter.groups"><code class="docutils literal notranslate"><span class="pre">groups</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="../api/psyplot.plotter.html#psyplot.plotter.is_data_dependent"><code class="docutils literal notranslate"><span class="pre">is_data_dependent()</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="../api/psyplot.project.html"><code class="docutils literal notranslate"><span class="pre">DataArrayPlotter</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="../api/psyplot.project.html#psyplot.project.DataArrayPlotterInterface"><code class="docutils literal notranslate"><span class="pre">DataArrayPlotterInterface</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="../api/psyplot.project.html#psyplot.project.DatasetPlotter"><code class="docutils literal notranslate"><span class="pre">DatasetPlotter</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="../api/psyplot.project.html#psyplot.project.DatasetPlotterInterface"><code class="docutils literal notranslate"><span class="pre">DatasetPlotterInterface</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="../api/psyplot.project.html#psyplot.project.PROJECT_CLS"><code class="docutils literal notranslate"><span class="pre">PROJECT_CLS</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="../api/psyplot.project.html#psyplot.project.PlotterInterface"><code class="docutils literal notranslate"><span class="pre">PlotterInterface</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="../api/psyplot.project.html#psyplot.project.Project"><code class="docutils literal notranslate"><span class="pre">Project</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="../api/psyplot.project.html#psyplot.project.ProjectPlotter"><code class="docutils literal notranslate"><span class="pre">ProjectPlotter</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="../api/psyplot.project.html#psyplot.project.close"><code class="docutils literal notranslate"><span class="pre">close()</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="../api/psyplot.project.html#psyplot.project.gcp"><code class="docutils literal notranslate"><span class="pre">gcp()</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="../api/psyplot.project.html#psyplot.project.get_project_nums"><code class="docutils literal notranslate"><span class="pre">get_project_nums()</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="../api/psyplot.project.html#psyplot.project.multiple_subplots"><code class="docutils literal notranslate"><span class="pre">multiple_subplots()</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="../api/psyplot.project.html#psyplot.project.plot"><code class="docutils literal notranslate"><span class="pre">plot</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="../api/psyplot.project.html#psyplot.project.project"><code class="docutils literal notranslate"><span class="pre">project()</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="../api/psyplot.project.html#psyplot.project.register_plotter"><code class="docutils literal notranslate"><span class="pre">register_plotter()</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="../api/psyplot.project.html#psyplot.project.scp"><code class="docutils literal notranslate"><span class="pre">scp()</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="../api/psyplot.project.html#psyplot.project.unregister_plotter"><code class="docutils literal notranslate"><span class="pre">unregister_plotter()</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="../api/psyplot.utils.html"><code class="docutils literal notranslate"><span class="pre">Defaultdict</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="../api/psyplot.utils.html#psyplot.utils.check_key"><code class="docutils literal notranslate"><span class="pre">check_key()</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="../api/psyplot.utils.html#psyplot.utils.get_default_value"><code class="docutils literal notranslate"><span class="pre">get_default_value()</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="../api/psyplot.utils.html#psyplot.utils.hashable"><code class="docutils literal notranslate"><span class="pre">hashable()</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="../api/psyplot.utils.html#psyplot.utils.is_iterable"><code class="docutils literal notranslate"><span class="pre">is_iterable()</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="../api/psyplot.utils.html#psyplot.utils.is_remote_url"><code class="docutils literal notranslate"><span class="pre">is_remote_url()</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="../api/psyplot.utils.html#psyplot.utils.isstring"><code class="docutils literal notranslate"><span class="pre">isstring()</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="../api/psyplot.utils.html#psyplot.utils.join_dicts"><code class="docutils literal notranslate"><span class="pre">join_dicts()</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="../api/psyplot.utils.html#psyplot.utils.plugin_entrypoints"><code class="docutils literal notranslate"><span class="pre">plugin_entrypoints()</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="../api/psyplot.utils.html#psyplot.utils.sort_kwargs"><code class="docutils literal notranslate"><span class="pre">sort_kwargs()</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="../api/psyplot.utils.html#psyplot.utils.unique_everseen"><code class="docutils literal notranslate"><span class="pre">unique_everseen()</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="../api/psyplot.warning.html"><code class="docutils literal notranslate"><span class="pre">PsyPlotCritical</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="../api/psyplot.warning.html#psyplot.warning.PsyPlotRuntimeWarning"><code class="docutils literal notranslate"><span class="pre">PsyPlotRuntimeWarning</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="../api/psyplot.warning.html#psyplot.warning.PsyPlotWarning"><code class="docutils literal notranslate"><span class="pre">PsyPlotWarning</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="../api/psyplot.warning.html#psyplot.warning.critical"><code class="docutils literal notranslate"><span class="pre">critical()</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="../api/psyplot.warning.html#psyplot.warning.customwarn"><code class="docutils literal notranslate"><span class="pre">customwarn()</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="../api/psyplot.warning.html#psyplot.warning.disable_warnings"><code class="docutils literal notranslate"><span class="pre">disable_warnings()</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="../api/psyplot.warning.html#psyplot.warning.warn"><code class="docutils literal notranslate"><span class="pre">warn()</span></code></a></li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../todos.html">ToDos</a></li>
<li class="toctree-l1"><a class="reference internal" href="../changelog.html">Changelog</a><ul>
<li class="toctree-l2"><a class="reference internal" href="../changelog.html#v1-5-1">v1.5.1</a><ul>
<li class="toctree-l3"><a class="reference internal" href="../changelog.html#added">Added</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../changelog.html#v1-5-0">v1.5.0</a><ul>
<li class="toctree-l3"><a class="reference internal" href="../changelog.html#changed">Changed</a></li>
<li class="toctree-l3"><a class="reference internal" href="../changelog.html#id2">Added</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../changelog.html#v1-4-3">v1.4.3</a></li>
<li class="toctree-l2"><a class="reference internal" href="../changelog.html#v1-4-2">v1.4.2</a><ul>
<li class="toctree-l3"><a class="reference internal" href="../changelog.html#id3">Changed</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../changelog.html#v1-4-1">v1.4.1</a><ul>
<li class="toctree-l3"><a class="reference internal" href="../changelog.html#id4">Added</a></li>
<li class="toctree-l3"><a class="reference internal" href="../changelog.html#fixed">Fixed</a></li>
<li class="toctree-l3"><a class="reference internal" href="../changelog.html#id5">Changed</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../changelog.html#v1-4-0">v1.4.0</a><ul>
<li class="toctree-l3"><a class="reference internal" href="../changelog.html#id6">Fixed</a></li>
<li class="toctree-l3"><a class="reference internal" href="../changelog.html#id7">Added</a></li>
<li class="toctree-l3"><a class="reference internal" href="../changelog.html#id8">Changed</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../changelog.html#v1-3-2">v1.3.2</a><ul>
<li class="toctree-l3"><a class="reference internal" href="../changelog.html#id9">Fixed</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../changelog.html#v1-3-1">v1.3.1</a><ul>
<li class="toctree-l3"><a class="reference internal" href="../changelog.html#id10">Fixed</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../changelog.html#v1-3-0">v1.3.0</a><ul>
<li class="toctree-l3"><a class="reference internal" href="../changelog.html#id11">Added</a></li>
<li class="toctree-l3"><a class="reference internal" href="../changelog.html#id12">Changed</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../changelog.html#v1-2-1">v1.2.1</a></li>
<li class="toctree-l2"><a class="reference internal" href="../changelog.html#v1-2-0">v1.2.0</a><ul>
<li class="toctree-l3"><a class="reference internal" href="../changelog.html#id13">Added</a></li>
<li class="toctree-l3"><a class="reference internal" href="../changelog.html#removed">Removed</a></li>
<li class="toctree-l3"><a class="reference internal" href="../changelog.html#id14">Changed</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../changelog.html#v1-1-0">v1.1.0</a><ul>
<li class="toctree-l3"><a class="reference internal" href="../changelog.html#id15">Added</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../changelog.html#v1-0-0">v1.0.0</a><ul>
<li class="toctree-l3"><a class="reference internal" href="../changelog.html#id16">Added</a></li>
<li class="toctree-l3"><a class="reference internal" href="../changelog.html#id17">Changed</a></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" >
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="../index.html">psyplot</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="Page navigation">
<ul class="wy-breadcrumbs">
<li><a href="../index.html" class="icon icon-home" aria-label="Home"></a></li>
<li class="breadcrumb-item"><a href="index.html">Developers guide</a></li>
<li class="breadcrumb-item active">The psyplot framework</li>
<li class="wy-breadcrumbs-aside">
<a href="../_sources/develop/framework.rst.txt" rel="nofollow"> View page source</a>
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<section id="the-psyplot-framework">
<span id="framework"></span><h1>The psyplot framework<a class="headerlink" href="#the-psyplot-framework" title="Link to this heading"></a></h1>
<img alt="../_images/psyplot_framework.gif" src="../_images/psyplot_framework.gif" />
<p>The main module we used so far, was the <a class="reference internal" href="../api/psyplot.project.html#module-psyplot.project" title="psyplot.project"><code class="xref py py-mod docutils literal notranslate"><span class="pre">psyplot.project</span></code></a> module. It is
the end of a whole framework that is setup by the psyplot package.</p>
<p>This framework is designed in analogy to matplotlibs
<a class="reference external" href="http://matplotlib.org/1.5.1/users/artists.html">figure - axes - artist setup</a>,
where one figure controls multiple axes, an axes is the manager of multiple
artists (e.g. a simple line) and each artist is responsible for visualizing one
or more objects on the plot. The psyplot framework instead is defined through
the <a class="reference internal" href="../api/psyplot.project.html#psyplot.project.Project" title="psyplot.project.Project"><code class="xref py py-class docutils literal notranslate"><span class="pre">Project</span></code></a> -
(<a class="reference internal" href="../api/psyplot.data.html#psyplot.data.InteractiveBase" title="psyplot.data.InteractiveBase"><code class="xref py py-class docutils literal notranslate"><span class="pre">InteractiveBase</span></code></a> - <a class="reference internal" href="../api/psyplot.plotter.html#psyplot.plotter.Plotter" title="psyplot.plotter.Plotter"><code class="xref py py-class docutils literal notranslate"><span class="pre">Plotter</span></code></a>) -
<a class="reference internal" href="../api/psyplot.plotter.html#psyplot.plotter.Formatoption" title="psyplot.plotter.Formatoption"><code class="xref py py-class docutils literal notranslate"><span class="pre">Formatoption</span></code></a> relationship.</p>
<p>The last to parts in this framework, the <a class="reference internal" href="../api/psyplot.plotter.html#psyplot.plotter.Plotter" title="psyplot.plotter.Plotter"><code class="xref py py-class docutils literal notranslate"><span class="pre">Plotter</span></code></a> and
<a class="reference internal" href="../api/psyplot.plotter.html#psyplot.plotter.Formatoption" title="psyplot.plotter.Formatoption"><code class="xref py py-class docutils literal notranslate"><span class="pre">Formatoption</span></code></a>, are only defined through abstract base
classes in this package. They are filled with contents in plugins such as the
<a class="reference external" href="https://psyplot.github.io/psy-simple/">psy-simple</a> or the <a class="reference external" href="https://psyplot.github.io/psy-maps/">psy-maps</a> plugin (see <a class="reference internal" href="../plugins.html#plugins"><span class="std std-ref">Psyplot plugins</span></a>).</p>
<section id="the-project-function">
<span id="project-framework"></span><h2>The <a class="reference internal" href="../api/psyplot.project.html#psyplot.project.project" title="psyplot.project.project"><code class="xref py py-func docutils literal notranslate"><span class="pre">project()</span></code></a> function<a class="headerlink" href="#the-project-function" title="Link to this heading"></a></h2>
<p>The <a class="reference internal" href="../api/psyplot.project.html#psyplot.project.Project" title="psyplot.project.Project"><code class="xref py py-class docutils literal notranslate"><span class="pre">psyplot.project.Project</span></code></a> class (in analogy to matplotlibs
<a class="reference external" href="https://matplotlib.org/stable/api/_as_gen/matplotlib.figure.Figure.html#matplotlib.figure.Figure" title="(in Matplotlib v3.9.1)"><code class="xref py py-class docutils literal notranslate"><span class="pre">Figure</span></code></a> class) is basically a list that controls
multiple plot objects. It comprises the full functionality of the package and
packs it into one class, the <a class="reference internal" href="../api/psyplot.project.html#psyplot.project.Project" title="psyplot.project.Project"><code class="xref py py-class docutils literal notranslate"><span class="pre">Project</span></code></a> class.</p>
<p>In analogy to pyplots <a class="reference external" href="https://matplotlib.org/stable/api/_as_gen/matplotlib.pyplot.figure.html#matplotlib.pyplot.figure" title="(in Matplotlib v3.9.1)"><code class="xref py py-func docutils literal notranslate"><span class="pre">figure()</span></code></a> function, a new project
can simply be created via</p>
<div class="highlight-ipython notranslate"><div class="highlight"><pre><span></span><span class="gp">In [1]: </span><span class="kn">import</span> <span class="nn">psyplot.project</span> <span class="k">as</span> <span class="nn">psy</span>
<span class="gp">In [2]: </span><span class="n">p</span> <span class="o">=</span> <span class="n">psy</span><span class="o">.</span><span class="n">project</span><span class="p">()</span>
</pre></div>
</div>
<p>This automatically sets <code class="docutils literal notranslate"><span class="pre">p</span></code> to be the current project which can be accessed
through the <a class="reference internal" href="../api/psyplot.project.html#psyplot.project.gcp" title="psyplot.project.gcp"><code class="xref py py-func docutils literal notranslate"><span class="pre">gcp()</span></code></a> method. You can also set the current
project by using the <a class="reference internal" href="../api/psyplot.project.html#psyplot.project.scp" title="psyplot.project.scp"><code class="xref py py-func docutils literal notranslate"><span class="pre">scp()</span></code></a> function.</p>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>We highly recommend to use the <a class="reference internal" href="../api/psyplot.project.html#psyplot.project.project" title="psyplot.project.project"><code class="xref py py-func docutils literal notranslate"><span class="pre">project()</span></code></a> function to create new
projects instead of creating projects from the <a class="reference internal" href="../api/psyplot.project.html#psyplot.project.Project" title="psyplot.project.Project"><code class="xref py py-class docutils literal notranslate"><span class="pre">Project</span></code></a>. This
ensures the right numbering of the projects of old projects.</p>
</div>
<p>The project uses the plotters from the <a class="reference internal" href="../api/psyplot.plotter.html#module-psyplot.plotter" title="psyplot.plotter"><code class="xref py py-mod docutils literal notranslate"><span class="pre">psyplot.plotter</span></code></a> module to
visualize your data. Hence you can add new plots and new data to the project by
using the <a class="reference internal" href="../api/psyplot.project.html#psyplot.project.Project.plot" title="psyplot.project.Project.plot"><code class="xref py py-attr docutils literal notranslate"><span class="pre">Project.plot</span></code></a> attribute or the <a class="reference internal" href="../api/psyplot.project.html#psyplot.project.plot" title="psyplot.project.plot"><code class="xref py py-attr docutils literal notranslate"><span class="pre">psyplot.project.plot</span></code></a>
attribute which targets the current project. The return types of the plotting
methods are again instances of the <a class="reference internal" href="../api/psyplot.project.html#psyplot.project.Project" title="psyplot.project.Project"><code class="xref py py-class docutils literal notranslate"><span class="pre">Project</span></code></a> class, however we consider
them as <em>subprojects</em> in contrast <em>main projects</em> that are created through the
<a class="reference internal" href="../api/psyplot.project.html#psyplot.project.project" title="psyplot.project.project"><code class="xref py py-func docutils literal notranslate"><span class="pre">project()</span></code></a> function. There is basically no difference but the result of the
<a class="reference internal" href="../api/psyplot.project.html#psyplot.project.Project.is_main" title="psyplot.project.Project.is_main"><code class="xref py py-attr docutils literal notranslate"><span class="pre">Project.is_main</span></code></a> attribute which is <code class="docutils literal notranslate"><span class="pre">False</span></code> for subprojects. Hence,
each new plot creates a subproject but also stores the data array in the
corresponding main project of the <a class="reference internal" href="../api/psyplot.project.html#psyplot.project.Project" title="psyplot.project.Project"><code class="xref py py-class docutils literal notranslate"><span class="pre">Project</span></code></a> instance from which the plot
method has been called. The newly created subproject can be accessed via</p>
<div class="highlight-ipython notranslate"><div class="highlight"><pre><span></span><span class="gp">In [3]: </span><span class="n">sp</span> <span class="o">=</span> <span class="n">psy</span><span class="o">.</span><span class="n">gcp</span><span class="p">()</span>
</pre></div>
</div>
<p>whereas the current main project can be accessed via</p>
<div class="highlight-ipython notranslate"><div class="highlight"><pre><span></span><span class="gp">In [4]: </span><span class="n">p</span> <span class="o">=</span> <span class="n">psy</span><span class="o">.</span><span class="n">gcp</span><span class="p">(</span><span class="n">main</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span>
</pre></div>
</div>
<p>Plots created by a specific method of the <a class="reference internal" href="../api/psyplot.project.html#psyplot.project.Project.plot" title="psyplot.project.Project.plot"><code class="xref py py-attr docutils literal notranslate"><span class="pre">Project.plot</span></code></a> attribute may
however be accessed via the corresponding attribute of the <a class="reference internal" href="../api/psyplot.project.html#psyplot.project.Project" title="psyplot.project.Project"><code class="xref py py-class docutils literal notranslate"><span class="pre">Project</span></code></a>
class. The following example creates three subprojects, two with the
<a class="reference internal" href="../api/psyplot.project.html#psyplot.project.ProjectPlotter.mapplot" title="psyplot.project.ProjectPlotter.mapplot"><code class="xref py py-attr docutils literal notranslate"><span class="pre">mapplot</span></code></a> and <a class="reference internal" href="../api/psyplot.project.html#psyplot.project.ProjectPlotter.mapvector" title="psyplot.project.ProjectPlotter.mapvector"><code class="xref py py-attr docutils literal notranslate"><span class="pre">mapvector</span></code></a> methods
from the <a class="reference external" href="https://psyplot.github.io/psy-maps/">psy-maps</a> plugin and one with the simple
<a class="reference internal" href="../api/psyplot.project.html#psyplot.project.ProjectPlotter.lineplot" title="psyplot.project.ProjectPlotter.lineplot"><code class="xref py py-attr docutils literal notranslate"><span class="pre">lineplot</span></code></a> method from the <a class="reference external" href="https://psyplot.github.io/psy-simple/">psy-simple</a> plugin to visualize
simple lines.</p>
<div class="highlight-ipython notranslate"><div class="highlight"><pre><span></span><span class="gp">In [5]: </span><span class="kn">import</span> <span class="nn">matplotlib.pyplot</span> <span class="k">as</span> <span class="nn">plt</span>
<span class="gp">In [6]: </span><span class="kn">import</span> <span class="nn">cartopy.crs</span> <span class="k">as</span> <span class="nn">ccrs</span>
<span class="go"># the subplots for the maps (need cartopy projections)</span>
<span class="gp">In [7]: </span><span class="n">ax</span> <span class="o">=</span> <span class="nb">list</span><span class="p">(</span><span class="n">psy</span><span class="o">.</span><span class="n">multiple_subplots</span><span class="p">(</span><span class="mi">2</span><span class="p">,</span> <span class="mi">2</span><span class="p">,</span> <span class="n">n</span><span class="o">=</span><span class="mi">3</span><span class="p">,</span> <span class="n">for_maps</span><span class="o">=</span><span class="kc">True</span><span class="p">))</span>
<span class="go"># the subplot for the line plot</span>
<span class="gp">In [8]: </span><span class="n">ax</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">plt</span><span class="o">.</span><span class="n">gcf</span><span class="p">()</span><span class="o">.</span><span class="n">add_subplot</span><span class="p">(</span><span class="mi">2</span><span class="p">,</span> <span class="mi">2</span><span class="p">,</span> <span class="mi">4</span><span class="p">))</span>
<span class="go"># scalar field of the zonal wind velocity in the file demo.nc</span>
<span class="gp">In [9]: </span><span class="n">psy</span><span class="o">.</span><span class="n">plot</span><span class="o">.</span><span class="n">mapplot</span><span class="p">(</span><span class="s1">'demo.nc'</span><span class="p">,</span> <span class="n">name</span><span class="o">=</span><span class="s1">'u'</span><span class="p">,</span> <span class="n">ax</span><span class="o">=</span><span class="n">ax</span><span class="p">[</span><span class="mi">0</span><span class="p">],</span> <span class="n">clabel</span><span class="o">=</span><span class="s1">'</span><span class="si">{desc}</span><span class="s1">'</span><span class="p">)</span>
<span class="gh">Out[9]: </span><span class="go">psyplot.project.Project([ arr0: 2-dim DataArray of u, with (lat, lon)=(96, 192), lev=1e+05, time=1979-01-31T18:00:00])</span>
<span class="go"># a second scalar field of temperature</span>
<span class="gp">In [10]: </span><span class="n">psy</span><span class="o">.</span><span class="n">plot</span><span class="o">.</span><span class="n">mapplot</span><span class="p">(</span><span class="s1">'demo.nc'</span><span class="p">,</span> <span class="n">name</span><span class="o">=</span><span class="s1">'t2m'</span><span class="p">,</span> <span class="n">ax</span><span class="o">=</span><span class="n">ax</span><span class="p">[</span><span class="mi">1</span><span class="p">],</span> <span class="n">clabel</span><span class="o">=</span><span class="s1">'</span><span class="si">{desc}</span><span class="s1">'</span><span class="p">)</span>
<span class="gh">Out[10]: </span><span class="go">psyplot.project.Project([ arr1: 2-dim DataArray of t2m, with (lat, lon)=(96, 192), lev=1e+05, time=1979-01-31T18:00:00])</span>
<span class="go"># a vector plot projected on the earth</span>
<span class="gp">In [11]: </span><span class="n">psy</span><span class="o">.</span><span class="n">plot</span><span class="o">.</span><span class="n">mapvector</span><span class="p">(</span><span class="s1">'demo.nc'</span><span class="p">,</span> <span class="n">name</span><span class="o">=</span><span class="p">[[</span><span class="s1">'u'</span><span class="p">,</span> <span class="s1">'v'</span><span class="p">]],</span> <span class="n">ax</span><span class="o">=</span><span class="n">ax</span><span class="p">[</span><span class="mi">2</span><span class="p">],</span>
<span class="gp"> ....: </span> <span class="n">attrs</span><span class="o">=</span><span class="p">{</span><span class="s1">'long_name'</span><span class="p">:</span> <span class="s1">'Wind speed'</span><span class="p">})</span>
<span class="gp"> ....: </span>
<span class="gh">Out[11]: </span><span class="go">psyplot.project.Project([ arr2: 3-dim DataArray of u, v, with (variable, lat, lon)=(2, 96, 192), lev=1e+05, time=1979-01-31T18:00:00])</span>
<span class="gp">In [12]: </span><span class="n">psy</span><span class="o">.</span><span class="n">plot</span><span class="o">.</span><span class="n">lineplot</span><span class="p">(</span><span class="s1">'demo.nc'</span><span class="p">,</span> <span class="n">name</span><span class="o">=</span><span class="s1">'t2m'</span><span class="p">,</span> <span class="n">x</span><span class="o">=</span><span class="mi">0</span><span class="p">,</span> <span class="n">y</span><span class="o">=</span><span class="mi">0</span><span class="p">,</span> <span class="n">z</span><span class="o">=</span><span class="nb">range</span><span class="p">(</span><span class="mi">4</span><span class="p">),</span>
<span class="gp"> ....: </span> <span class="n">ax</span><span class="o">=</span><span class="n">ax</span><span class="p">[</span><span class="mi">3</span><span class="p">],</span> <span class="n">xticklabels</span><span class="o">=</span><span class="s1">'%b </span><span class="si">%d</span><span class="s1">'</span><span class="p">,</span> <span class="n">ylabel</span><span class="o">=</span><span class="s1">'</span><span class="si">{desc}</span><span class="s1">'</span><span class="p">,</span>
<span class="gp"> ....: </span> <span class="n">legendlabels</span><span class="o">=</span><span class="s1">'</span><span class="si">%(zname)s</span><span class="s1"> = </span><span class="si">%(z)s</span><span class="s1"> </span><span class="si">%(zunits)s</span><span class="s1">'</span><span class="p">)</span>
<span class="gp"> ....: </span>
<span class="gh">Out[12]: </span>
<span class="go">psyplot.project.Project([arr3: psyplot.data.InteractiveList([</span>
<span class="go"> arr0: 1-dim DataArray of t2m, with (time)=(5,), lon=0.0, lat=88.57, lev=1e+05,</span>
<span class="go"> arr1: 1-dim DataArray of t2m, with (time)=(5,), lon=0.0, lat=88.57, lev=8.5e+04,</span>
<span class="go"> arr2: 1-dim DataArray of t2m, with (time)=(5,), lon=0.0, lat=88.57, lev=5e+04,</span>
<span class="go"> arr3: 1-dim DataArray of t2m, with (time)=(5,), lon=0.0, lat=88.57, lev=2e+04])])</span>
</pre></div>
</div>
<a class="reference internal image-reference" href="../_images/docs_framework_project_demo1.png"><img alt="../_images/docs_framework_project_demo1.png" src="../_images/docs_framework_project_demo1.png" style="width: 4in;" /></a>
<p>The latter is now the current subproject we could access via
<a class="reference internal" href="../api/psyplot.project.html#psyplot.project.gcp" title="psyplot.project.gcp"><code class="xref py py-func docutils literal notranslate"><span class="pre">psy.gcp()</span></code></a>. However we can access all of them through the main
project</p>
<div class="highlight-ipython notranslate"><div class="highlight"><pre><span></span><span class="gp">In [13]: </span><span class="n">mp</span> <span class="o">=</span> <span class="n">psy</span><span class="o">.</span><span class="n">gcp</span><span class="p">(</span><span class="kc">True</span><span class="p">)</span>
<span class="gp">In [14]: </span><span class="n">mp</span> <span class="c1"># all arrays</span>
<span class="gh">Out[14]: </span>
<span class="go">2 Main psyplot.project.Project([</span>
<span class="go"> arr0: 2-dim DataArray of u, with (lat, lon)=(96, 192), lev=1e+05, time=1979-01-31T18:00:00,</span>
<span class="go"> arr1: 2-dim DataArray of t2m, with (lat, lon)=(96, 192), lev=1e+05, time=1979-01-31T18:00:00,</span>
<span class="go"> arr2: 3-dim DataArray of u, v, with (variable, lat, lon)=(2, 96, 192), lev=1e+05, time=1979-01-31T18:00:00,</span>
<span class="go"> arr3: psyplot.data.InteractiveList([</span>
<span class="go"> arr0: 1-dim DataArray of t2m, with (time)=(5,), lon=0.0, lat=88.57, lev=1e+05,</span>
<span class="go"> arr1: 1-dim DataArray of t2m, with (time)=(5,), lon=0.0, lat=88.57, lev=8.5e+04,</span>
<span class="go"> arr2: 1-dim DataArray of t2m, with (time)=(5,), lon=0.0, lat=88.57, lev=5e+04,</span>
<span class="go"> arr3: 1-dim DataArray of t2m, with (time)=(5,), lon=0.0, lat=88.57, lev=2e+04])])</span>
<span class="gp">In [15]: </span><span class="n">mp</span><span class="o">.</span><span class="n">mapplot</span> <span class="c1"># all scalar fields</span>
<span class="gh">Out[15]: </span>
<span class="go">psyplot.project.Project([</span>
<span class="go"> arr0: 2-dim DataArray of u, with (lat, lon)=(96, 192), lev=1e+05, time=1979-01-31T18:00:00,</span>
<span class="go"> arr1: 2-dim DataArray of t2m, with (lat, lon)=(96, 192), lev=1e+05, time=1979-01-31T18:00:00])</span>
<span class="gp">In [16]: </span><span class="n">mp</span><span class="o">.</span><span class="n">mapvector</span> <span class="c1"># all vector plots</span>
<span class="gh">Out[16]: </span><span class="go">psyplot.project.Project([ arr2: 3-dim DataArray of u, v, with (variable, lat, lon)=(2, 96, 192), lev=1e+05, time=1979-01-31T18:00:00])</span>
<span class="gp">In [17]: </span><span class="n">mp</span><span class="o">.</span><span class="n">maps</span> <span class="c1"># all data arrays that are plotted on a map</span>
<span class="gh">Out[17]: </span>
<span class="go">psyplot.project.Project([</span>
<span class="go"> arr0: 2-dim DataArray of u, with (lat, lon)=(96, 192), lev=1e+05, time=1979-01-31T18:00:00,</span>
<span class="go"> arr1: 2-dim DataArray of t2m, with (lat, lon)=(96, 192), lev=1e+05, time=1979-01-31T18:00:00,</span>
<span class="go"> arr2: 3-dim DataArray of u, v, with (variable, lat, lon)=(2, 96, 192), lev=1e+05, time=1979-01-31T18:00:00])</span>
<span class="gp">In [18]: </span><span class="n">mp</span><span class="o">.</span><span class="n">lineplot</span> <span class="c1"># the simple plot we created</span>
<span class="gh">Out[18]: </span>
<span class="go">psyplot.project.Project([arr3: psyplot.data.InteractiveList([</span>
<span class="go"> arr0: 1-dim DataArray of t2m, with (time)=(5,), lon=0.0, lat=88.57, lev=1e+05,</span>
<span class="go"> arr1: 1-dim DataArray of t2m, with (time)=(5,), lon=0.0, lat=88.57, lev=8.5e+04,</span>
<span class="go"> arr2: 1-dim DataArray of t2m, with (time)=(5,), lon=0.0, lat=88.57, lev=5e+04,</span>
<span class="go"> arr3: 1-dim DataArray of t2m, with (time)=(5,), lon=0.0, lat=88.57, lev=2e+04])])</span>
</pre></div>
</div>
<p>The advantage is, since every plotter has different formatoptions, we can
now update them very easily. For example lets update the arrowsize to
1 (which only works for the <a class="reference internal" href="../api/psyplot.project.html#psyplot.project.Project.mapvector" title="psyplot.project.Project.mapvector"><code class="xref py py-attr docutils literal notranslate"><span class="pre">mapvector</span></code></a> plots), the projection
to an orthogonal (which only works for <a class="reference internal" href="../api/psyplot.project.html#psyplot.project.Project.maps" title="psyplot.project.Project.maps"><code class="xref py py-attr docutils literal notranslate"><span class="pre">maps</span></code></a>), the simple
plots to use the <code class="docutils literal notranslate"><span class="pre">'viridis'</span></code> colormap for color coding the lines and for all
we choose their title corresponding to the variable names</p>
<div class="highlight-ipython notranslate"><div class="highlight"><pre><span></span><span class="gp">In [19]: </span><span class="n">p</span><span class="o">.</span><span class="n">maps</span><span class="o">.</span><span class="n">update</span><span class="p">(</span><span class="n">projection</span><span class="o">=</span><span class="s1">'ortho'</span><span class="p">)</span>
<span class="gp">In [20]: </span><span class="n">p</span><span class="o">.</span><span class="n">mapvector</span><span class="o">.</span><span class="n">update</span><span class="p">(</span><span class="n">color</span><span class="o">=</span><span class="s1">'r'</span><span class="p">,</span> <span class="n">plot</span><span class="o">=</span><span class="s1">'stream'</span><span class="p">,</span> <span class="n">lonlatbox</span><span class="o">=</span><span class="s1">'Europe'</span><span class="p">)</span>
<span class="gp">In [21]: </span><span class="n">p</span><span class="o">.</span><span class="n">lineplot</span><span class="o">.</span><span class="n">update</span><span class="p">(</span><span class="n">color</span><span class="o">=</span><span class="s1">'viridis'</span><span class="p">)</span>
<span class="gp">In [22]: </span><span class="n">p</span><span class="o">.</span><span class="n">update</span><span class="p">(</span><span class="n">title</span><span class="o">=</span><span class="s1">'</span><span class="si">%(long_name)s</span><span class="s1">'</span><span class="p">)</span>
</pre></div>
</div>
<a class="reference internal image-reference" href="../_images/docs_framework_project_demo2.png"><img alt="../_images/docs_framework_project_demo2.png" src="../_images/docs_framework_project_demo2.png" style="width: 4in;" /></a>
</section>
<section id="the-interactivebase-and-the-plotter-classes">
<h2>The <a class="reference internal" href="../api/psyplot.data.html#psyplot.data.InteractiveBase" title="psyplot.data.InteractiveBase"><code class="xref py py-class docutils literal notranslate"><span class="pre">InteractiveBase</span></code></a> and the <a class="reference internal" href="../api/psyplot.plotter.html#psyplot.plotter.Plotter" title="psyplot.plotter.Plotter"><code class="xref py py-class docutils literal notranslate"><span class="pre">Plotter</span></code></a> classes<a class="headerlink" href="#the-interactivebase-and-the-plotter-classes" title="Link to this heading"></a></h2>
<section id="interactive-data-objects">
<h3>Interactive data objects<a class="headerlink" href="#interactive-data-objects" title="Link to this heading"></a></h3>
<p>The next level are instances of the
<a class="reference internal" href="../api/psyplot.data.html#psyplot.data.InteractiveBase" title="psyplot.data.InteractiveBase"><code class="xref py py-class docutils literal notranslate"><span class="pre">InteractiveBase</span></code></a> class. This abstract base
class provides an interface between the data and the visualization. Hence a
plotter (that’s how we call instances of the <a class="reference internal" href="../api/psyplot.plotter.html#psyplot.plotter.Plotter" title="psyplot.plotter.Plotter"><code class="xref py py-class docutils literal notranslate"><span class="pre">Plotter</span></code></a> class) will deal
with the subclasses of the <a class="reference internal" href="../api/psyplot.data.html#psyplot.data.InteractiveBase" title="psyplot.data.InteractiveBase"><code class="xref py py-class docutils literal notranslate"><span class="pre">InteractiveBase</span></code></a>:</p>
<table class="autosummary longtable docutils align-default">
<tbody>
<tr class="row-odd"><td><p><a class="reference internal" href="../api/psyplot.data.html#psyplot.data.InteractiveArray" title="psyplot.data.InteractiveArray"><code class="xref py py-obj docutils literal notranslate"><span class="pre">InteractiveArray</span></code></a>(xarray_obj, *args, **kwargs)</p></td>
<td><p>Interactive psyplot accessor for the data array</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="../api/psyplot.data.html#psyplot.data.InteractiveList" title="psyplot.data.InteractiveList"><code class="xref py py-obj docutils literal notranslate"><span class="pre">InteractiveList</span></code></a>(*args, **kwargs)</p></td>
<td><p>List of <code class="xref py py-class docutils literal notranslate"><span class="pre">InteractiveArray</span></code> instances that can be plotted itself</p></td>
</tr>
</tbody>
</table>
<p>Those classes (in particular the <a class="reference internal" href="../api/psyplot.data.html#psyplot.data.InteractiveArray" title="psyplot.data.InteractiveArray"><code class="xref py py-class docutils literal notranslate"><span class="pre">InteractiveArray</span></code></a>) keep
the reference to the base dataset to allow the update of the dataslice you are
plotting. The <a class="reference internal" href="../api/psyplot.data.html#psyplot.data.InteractiveList" title="psyplot.data.InteractiveList"><code class="xref py py-class docutils literal notranslate"><span class="pre">InteractiveList</span></code></a> class can be used in a
plotter for the visualization of multiple
<a class="reference internal" href="../api/psyplot.data.html#psyplot.data.InteractiveArray" title="psyplot.data.InteractiveArray"><code class="xref py py-class docutils literal notranslate"><span class="pre">InteractiveArray</span></code></a> instances (see for example the
<code class="xref py py-class docutils literal notranslate"><span class="pre">psyplot.plotter.simple.LinePlotter</span></code> and
<code class="xref py py-class docutils literal notranslate"><span class="pre">psyplot.plotter.maps.CombinedPlotter</span></code> classes).
Furthermore those data instances have a
<a class="reference internal" href="../api/psyplot.data.html#psyplot.data.InteractiveBase.plotter" title="psyplot.data.InteractiveBase.plotter"><code class="xref py py-attr docutils literal notranslate"><span class="pre">plotter</span></code></a> attribute that is usually
occupied by an instance of a <a class="reference internal" href="../api/psyplot.plotter.html#psyplot.plotter.Plotter" title="psyplot.plotter.Plotter"><code class="xref py py-class docutils literal notranslate"><span class="pre">Plotter</span></code></a> subclass.</p>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>The <a class="reference internal" href="../api/psyplot.data.html#psyplot.data.InteractiveArray" title="psyplot.data.InteractiveArray"><code class="xref py py-class docutils literal notranslate"><span class="pre">InteractiveArray</span></code></a> serves as a
<a class="reference external" href="https://docs.xarray.dev/en/stable/generated/xarray.DataArray.html#xarray.DataArray" title="(in xarray v2024.6.1.dev0)"><code class="xref py py-class docutils literal notranslate"><span class="pre">DataArray</span></code></a> accessor. After you imported psyplot, you can
access it via the <code class="docutils literal notranslate"><span class="pre">psy</span></code> attribute of a <a class="reference external" href="https://docs.xarray.dev/en/stable/generated/xarray.DataArray.html#xarray.DataArray" title="(in xarray v2024.6.1.dev0)"><code class="xref py py-class docutils literal notranslate"><span class="pre">DataArray</span></code></a>, i.e.
via</p>
<div class="highlight-ipython notranslate"><div class="highlight"><pre><span></span><span class="gp">In [23]: </span><span class="kn">import</span> <span class="nn">xarray</span> <span class="k">as</span> <span class="nn">xr</span>
<span class="gp">In [24]: </span><span class="n">xr</span><span class="o">.</span><span class="n">DataArray</span><span class="p">([])</span><span class="o">.</span><span class="n">psy</span>
<span class="gh">Out[24]: </span><span class="go"><psyplot.data.InteractiveArray at 0x7f39a07a62b0></span>
</pre></div>
</div>
</div>
</section>
<section id="visualization-objects">
<h3>Visualization objects<a class="headerlink" href="#visualization-objects" title="Link to this heading"></a></h3>
<p>Each plotter class is the coordinator of several visualization options.
Thereby the <a class="reference internal" href="../api/psyplot.plotter.html#psyplot.plotter.Plotter" title="psyplot.plotter.Plotter"><code class="xref py py-class docutils literal notranslate"><span class="pre">Plotter</span></code></a> class itself contains only
the structural functionality for managing the formatoptions that do the
real work. The plotters for the real usage are defined in plugins like the
<a class="reference external" href="https://psyplot.github.io/psy-simple/">psy-simple</a> or the <a class="reference external" href="https://psyplot.github.io/psy-maps/">psy-maps</a> package.</p>
<p>Hence each <a class="reference internal" href="../api/psyplot.data.html#psyplot.data.InteractiveBase" title="psyplot.data.InteractiveBase"><code class="xref py py-class docutils literal notranslate"><span class="pre">InteractiveBase</span></code></a> instance is visualized by
exactly one <a class="reference internal" href="../api/psyplot.plotter.html#psyplot.plotter.Plotter" title="psyplot.plotter.Plotter"><code class="xref py py-class docutils literal notranslate"><span class="pre">Plotter</span></code></a> class. If you don’t want to use the
<a class="reference internal" href="#project-framework"><span class="std std-ref">project framework</span></a>, the initialization of such an
instance nevertheless straight forward. Just open a dataset, extract the right
data array and plot it</p>
<div class="highlight-ipython notranslate"><div class="highlight"><pre><span></span><span class="gp">In [25]: </span><span class="kn">from</span> <span class="nn">psyplot</span> <span class="kn">import</span> <span class="n">open_dataset</span>
<span class="gp">In [26]: </span><span class="kn">from</span> <span class="nn">psy_maps.plotters</span> <span class="kn">import</span> <span class="n">FieldPlotter</span>
<span class="gp">In [27]: </span><span class="n">ds</span> <span class="o">=</span> <span class="n">open_dataset</span><span class="p">(</span><span class="s1">'demo.nc'</span><span class="p">)</span>
<span class="gp">In [28]: </span><span class="n">arr</span> <span class="o">=</span> <span class="n">ds</span><span class="o">.</span><span class="n">t2m</span><span class="p">[</span><span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">]</span>
<span class="gp">In [29]: </span><span class="n">plotter</span> <span class="o">=</span> <span class="n">FieldPlotter</span><span class="p">(</span><span class="n">arr</span><span class="p">)</span>
</pre></div>
</div>
<a class="reference internal image-reference" href="../_images/docs_framework_plotter_demo.png"><img alt="../_images/docs_framework_plotter_demo.png" src="../_images/docs_framework_plotter_demo.png" style="width: 4in;" /></a>
<p>Now we created a plotter with all it’s formatoptions:</p>
<div class="highlight-ipython notranslate"><div class="highlight"><pre><span></span><span class="gp">In [30]: </span><span class="nb">type</span><span class="p">(</span><span class="n">plotter</span><span class="p">),</span> <span class="n">plotter</span>
<span class="gh">Out[30]: </span>
<span class="go">(psy_maps.plotters.FieldPlotter,</span>
<span class="go"> {'levels': None,</span>
<span class="go"> 'interp_bounds': None,</span>
<span class="go"> 'plot': 'mesh',</span>
<span class="go"> 'miss_color': None,</span>
<span class="go"> 'background': 'rc',</span>
<span class="go"> 'transpose': False,</span>
<span class="go"> 'projection': 'cf',</span>
<span class="go"> 'transform': 'cf',</span>
<span class="go"> 'clon': None,</span>
<span class="go"> 'clat': None,</span>
<span class="go"> 'lonlatbox': None,</span>
<span class="go"> 'lsm': {'res': '110m', 'linewidth': 1.0, 'coast': 'k'},</span>
<span class="go"> 'stock_img': False,</span>
<span class="go"> 'grid_color': 'k',</span>
<span class="go"> 'grid_labels': None,</span>
<span class="go"> 'grid_labelsize': 12.0,</span>
<span class="go"> 'grid_settings': {},</span>
<span class="go"> 'xgrid': True,</span>
<span class="go"> 'ygrid': True,</span>
<span class="go"> 'map_extent': None,</span>
<span class="go"> 'google_map_detail': None,</span>
<span class="go"> 'datagrid': None,</span>
<span class="go"> 'clip': None,</span>
<span class="go"> 'cmap': 'white_blue_red',</span>
<span class="go"> 'bounds': [<BoundsMethod.rounded: 'rounded'>, None, 0.0, 100.0, None, None],</span>
<span class="go"> 'extend': 'neither',</span>
<span class="go"> 'cbar': {'b'},</span>
<span class="go"> 'clabel': '',</span>
<span class="go"> 'clabelsize': 'medium',</span>
<span class="go"> 'clabelweight': None,</span>
<span class="go"> 'cbarspacing': 'uniform',</span>
<span class="go"> 'clabelprops': {},</span>
<span class="go"> 'cticks': None,</span>
<span class="go"> 'cticklabels': None,</span>
<span class="go"> 'cticksize': 'medium',</span>
<span class="go"> 'ctickweight': None,</span>
<span class="go"> 'ctickprops': {},</span>
<span class="go"> 'mask_datagrid': True,</span>
<span class="go"> 'tight': False,</span>
<span class="go"> 'maskless': None,</span>
<span class="go"> 'maskleq': None,</span>
<span class="go"> 'maskgreater': None,</span>
<span class="go"> 'maskgeq': None,</span>
<span class="go"> 'maskbetween': None,</span>
<span class="go"> 'mask': None,</span>
<span class="go"> 'title': '',</span>
<span class="go"> 'titlesize': 'large',</span>
<span class="go"> 'titleweight': None,</span>
<span class="go"> 'titleprops': {},</span>
<span class="go"> 'figtitle': '',</span>
<span class="go"> 'figtitlesize': 12.0,</span>
<span class="go"> 'figtitleweight': None,</span>
<span class="go"> 'figtitleprops': {},</span>
<span class="go"> 'text': [],</span>
<span class="go"> 'post_timing': 'never',</span>
<span class="go"> 'post': None})</span>
</pre></div>
</div>
<p>You can use the <a class="reference internal" href="../api/psyplot.plotter.html#psyplot.plotter.Plotter.show_keys" title="psyplot.plotter.Plotter.show_keys"><code class="xref py py-meth docutils literal notranslate"><span class="pre">show_keys()</span></code></a>, <a class="reference internal" href="../api/psyplot.plotter.html#psyplot.plotter.Plotter.show_summaries" title="psyplot.plotter.Plotter.show_summaries"><code class="xref py py-meth docutils literal notranslate"><span class="pre">show_summaries()</span></code></a> and
<a class="reference internal" href="../api/psyplot.plotter.html#psyplot.plotter.Plotter.show_docs" title="psyplot.plotter.Plotter.show_docs"><code class="xref py py-meth docutils literal notranslate"><span class="pre">show_docs()</span></code></a> methods to have a look into the documentation into
the formatoptions or you simply use the builtin <a class="reference external" href="https://docs.python.org/3/library/functions.html#help" title="(in Python v3.12)"><code class="xref py py-func docutils literal notranslate"><span class="pre">help()</span></code></a> function for it:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="n">help</span><span class="p">(</span><span class="n">plotter</span><span class="o">.</span><span class="n">clabel</span><span class="p">)</span>
</pre></div>
</div>
<p>The update methods are the same as for the <a class="reference internal" href="../api/psyplot.project.html#psyplot.project.Project" title="psyplot.project.Project"><code class="xref py py-class docutils literal notranslate"><span class="pre">Project</span></code></a>
class. You can use the <a class="reference internal" href="../api/psyplot.data.html#psyplot.data.InteractiveArray.update" title="psyplot.data.InteractiveArray.update"><code class="xref py py-meth docutils literal notranslate"><span class="pre">psyplot.data.InteractiveArray.update()</span></code></a> via
<code class="docutils literal notranslate"><span class="pre">arr.psy.update()</span></code> which updates the data and forwards the formatoptions to
the <a class="reference internal" href="../api/psyplot.plotter.html#psyplot.plotter.Plotter.update" title="psyplot.plotter.Plotter.update"><code class="xref py py-meth docutils literal notranslate"><span class="pre">Plotter.update()</span></code></a> method.</p>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>Plotters are subclasses of dictionaries where each item represents the
key-value pair of one formatoption. Anyway, although you could now simply
set a formatoption like you set an item for a dictionary via</p>
<div class="highlight-ipython notranslate"><div class="highlight"><pre><span></span><span class="gp">In [31]: </span><span class="n">plotter</span><span class="p">[</span><span class="s1">'clabel'</span><span class="p">]</span> <span class="o">=</span> <span class="s1">'my label'</span>
</pre></div>
</div>
<p>or equivalently</p>
<div class="highlight-ipython notranslate"><div class="highlight"><pre><span></span><span class="gp">In [32]: </span><span class="n">plotter</span><span class="o">.</span><span class="n">clabel</span> <span class="o">=</span> <span class="s1">'my label'</span>
</pre></div>
</div>
<p>this would not change the plot! Instead you have to use the
<a class="reference internal" href="../api/psyplot.plotter.html#psyplot.plotter.Plotter.update" title="psyplot.plotter.Plotter.update"><code class="xref py py-meth docutils literal notranslate"><span class="pre">psyplot.plotter.Plotter.update()</span></code></a> method, i.e.</p>
<div class="highlight-ipython notranslate"><div class="highlight"><pre><span></span><span class="gp">In [33]: </span><span class="n">plotter</span><span class="o">.</span><span class="n">update</span><span class="p">(</span><span class="n">clabel</span><span class="o">=</span><span class="s1">'my label'</span><span class="p">)</span>
</pre></div>
</div>
</div>
</section>
</section>
<section id="formatoptions">
<h2>Formatoptions<a class="headerlink" href="#formatoptions" title="Link to this heading"></a></h2>
<p>Formatoptions are the core of the visualization in the psyplot framework. They
conceptually correspond to the basic <a class="reference external" href="https://matplotlib.org/stable/api/artist_api.html#matplotlib.artist.Artist" title="(in Matplotlib v3.9.1)"><code class="xref py py-class docutils literal notranslate"><span class="pre">matplotlib.artist.Artist</span></code></a> and
inherit from the abstract <a class="reference internal" href="../api/psyplot.plotter.html#psyplot.plotter.Formatoption" title="psyplot.plotter.Formatoption"><code class="xref py py-class docutils literal notranslate"><span class="pre">Formatoption</span></code></a> class. Each
plotter is set up through it’s formatoptions where each formatoption has a
unique formatoption key inside the plotter. This formatoption key (e.g. ‘title’
or ‘clabel’) is what is used for updating the plot etc. You can find more
information in <a class="reference internal" href="plugins_guide.html#plugins-guide"><span class="std std-ref">How to implement your own plotters and plugins</span></a> .</p>
</section>
</section>
</div>
</div>
<!--
SPDX-FileCopyrightText: 2021-2024 Helmholtz-Zentrum hereon GmbH
SPDX-License-Identifier: CC-BY-4.0
-->
<footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
<a href="index.html" class="btn btn-neutral float-left" title="Developers guide" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
<a href="plugins_guide.html" class="btn btn-neutral float-right" title="How to implement your own plotters and plugins" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
</div>
<hr/>
<div role="contentinfo">
<p>© Copyright 2021-2024 Helmholtz-Zentrum hereon GmbH.</p>
</div>
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
provided by <a href="https://readthedocs.org">Read the Docs</a>.
<div class="footer">
<span class="creativecommons">
<a href="https://creativecommons.org/licenses/by/4.0/" >
<img style="height: 1.5em;" src="../_static/license_logo.png" border="0" alt="Creative Commons License"/>
</a>
This documentation is licensed under
<a href="https://creativecommons.org/licenses/by/4.0/">
CC-BY-4.0
</a>
</span>
</div>
</footer>
</div>
</div>
</section>
</div>
<script>
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</body>
</html>