-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathpsyplot.utils.html
More file actions
627 lines (590 loc) · 59.7 KB
/
Copy pathpsyplot.utils.html
File metadata and controls
627 lines (590 loc) · 59.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
<!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><no title> — 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="<no title>" href="psyplot.warning.html" />
<link rel="prev" title="<no title>" href="psyplot.project.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"><a class="reference internal" href="../develop/index.html">Developers guide</a><ul>
<li class="toctree-l2"><a class="reference internal" href="../develop/framework.html">The psyplot framework</a><ul>
<li class="toctree-l3"><a class="reference internal" href="../develop/framework.html#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="../develop/framework.html#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="../develop/framework.html#interactive-data-objects">Interactive data objects</a></li>
<li class="toctree-l4"><a class="reference internal" href="../develop/framework.html#visualization-objects">Visualization objects</a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="../develop/framework.html#formatoptions">Formatoptions</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../develop/plugins_guide.html">How to implement your own plotters and plugins</a><ul>
<li class="toctree-l3"><a class="reference internal" href="../develop/plugins_guide.html#creating-plotters">Creating plotters</a><ul>
<li class="toctree-l4"><a class="reference internal" href="../develop/plugins_guide.html#interface-for-the-plotter">Interface for the plotter</a></li>
<li class="toctree-l4"><a class="reference internal" href="../develop/plugins_guide.html#interface-to-the-data">Interface to the data</a></li>
<li class="toctree-l4"><a class="reference internal" href="../develop/plugins_guide.html#interfacing-to-other-formatoptions">Interfacing to other formatoptions</a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="../develop/plugins_guide.html#creating-new-plugins">Creating new plugins</a><ul>
<li class="toctree-l4"><a class="reference internal" href="../develop/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="../develop/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 current"><a class="reference internal" href="../api.html">API Reference</a><ul class="current">
<li class="toctree-l2 current"><a class="reference internal" href="psyplot.html">psyplot package</a><ul class="current">
<li class="toctree-l3"><a class="reference internal" href="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="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="psyplot.html#subpackages">Subpackages</a><ul>
<li class="toctree-l4"><a class="reference internal" href="psyplot.config.html">psyplot.config package</a></li>
<li class="toctree-l4"><a class="reference internal" href="psyplot.sphinxext.html">psyplot.sphinxext package</a></li>
</ul>
</li>
<li class="toctree-l3 current"><a class="reference internal" href="psyplot.html#submodules">Submodules</a><ul class="current">
<li class="toctree-l4"><a class="reference internal" href="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="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="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="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="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="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="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="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="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="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="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="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="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="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="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="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="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="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="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="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="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="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="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="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="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="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="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="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="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="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="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="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="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="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="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="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="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="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="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="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="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="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="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="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="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="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="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="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="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="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="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="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="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="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="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="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="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="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="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 current"><a class="current reference internal" href="#"><code class="docutils literal notranslate"><span class="pre">Defaultdict</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="#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="#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="#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="#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="#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="#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="#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="#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="#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="#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="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="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="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="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="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="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="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="../api.html">API Reference</a></li>
<li class="breadcrumb-item"><a href="psyplot.html">psyplot package</a></li>
<li class="breadcrumb-item active"><no title></li>
<li class="wy-breadcrumbs-aside">
<a href="../_sources/api/psyplot.utils.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">
<p id="module-psyplot.utils">Miscallaneous utility functions for the psyplot package.</p>
<p><strong>Classes:</strong></p>
<table class="autosummary longtable docutils align-default">
<tbody>
<tr class="row-odd"><td><p><a class="reference internal" href="#psyplot.utils.Defaultdict" title="psyplot.utils.Defaultdict"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Defaultdict</span></code></a>([default_factory])</p></td>
<td><p>An ordered <a class="reference external" href="https://docs.python.org/3/library/collections.html#collections.defaultdict" title="(in Python v3.12)"><code class="xref py py-class docutils literal notranslate"><span class="pre">collections.defaultdict</span></code></a></p></td>
</tr>
</tbody>
</table>
<p><strong>Functions:</strong></p>
<table class="autosummary longtable docutils align-default">
<tbody>
<tr class="row-odd"><td><p><a class="reference internal" href="#psyplot.utils.check_key" title="psyplot.utils.check_key"><code class="xref py py-obj docutils literal notranslate"><span class="pre">check_key</span></code></a>(key, possible_keys[, raise_error, ...])</p></td>
<td><p>Checks whether the key is in a list of possible keys</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="#psyplot.utils.get_default_value" title="psyplot.utils.get_default_value"><code class="xref py py-obj docutils literal notranslate"><span class="pre">get_default_value</span></code></a>(func, arg)</p></td>
<td><p></p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="#psyplot.utils.hashable" title="psyplot.utils.hashable"><code class="xref py py-obj docutils literal notranslate"><span class="pre">hashable</span></code></a>(val)</p></td>
<td><p>Test if <cite>val</cite> is hashable and if not, get it's string representation</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="#psyplot.utils.is_iterable" title="psyplot.utils.is_iterable"><code class="xref py py-obj docutils literal notranslate"><span class="pre">is_iterable</span></code></a>(iterable)</p></td>
<td><p>Test if an object is iterable</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="#psyplot.utils.is_remote_url" title="psyplot.utils.is_remote_url"><code class="xref py py-obj docutils literal notranslate"><span class="pre">is_remote_url</span></code></a>(path)</p></td>
<td><p></p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="#psyplot.utils.isstring" title="psyplot.utils.isstring"><code class="xref py py-obj docutils literal notranslate"><span class="pre">isstring</span></code></a>(s)</p></td>
<td><p></p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="#psyplot.utils.join_dicts" title="psyplot.utils.join_dicts"><code class="xref py py-obj docutils literal notranslate"><span class="pre">join_dicts</span></code></a>(dicts[, delimiter, keep_all])</p></td>
<td><p>Join multiple dictionaries into one</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="#psyplot.utils.plugin_entrypoints" title="psyplot.utils.plugin_entrypoints"><code class="xref py py-obj docutils literal notranslate"><span class="pre">plugin_entrypoints</span></code></a>([group, name])</p></td>
<td><p>This utility function gets the entry points of the psyplot plugins</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="#psyplot.utils.sort_kwargs" title="psyplot.utils.sort_kwargs"><code class="xref py py-obj docutils literal notranslate"><span class="pre">sort_kwargs</span></code></a>(kwargs, *param_lists)</p></td>
<td><p>Function to sort keyword arguments and sort them into dictionaries</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="#psyplot.utils.unique_everseen" title="psyplot.utils.unique_everseen"><code class="xref py py-obj docutils literal notranslate"><span class="pre">unique_everseen</span></code></a>(iterable[, key])</p></td>
<td><p>List unique elements, preserving order.</p></td>
</tr>
</tbody>
</table>
<dl class="py class">
<dt class="sig sig-object py" id="psyplot.utils.Defaultdict">
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">psyplot.utils.</span></span><span class="sig-name descname"><span class="pre">Defaultdict</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">default_factory</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">*</span></span><span class="n"><span class="pre">a</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kw</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/psyplot/utils.html#Defaultdict"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#psyplot.utils.Defaultdict" title="Link to this definition"></a></dt>
<dd><p>Bases: <a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#dict" title="(in Python v3.12)"><code class="xref py py-class docutils literal notranslate"><span class="pre">dict</span></code></a></p>
<p>An ordered <a class="reference external" href="https://docs.python.org/3/library/collections.html#collections.defaultdict" title="(in Python v3.12)"><code class="xref py py-class docutils literal notranslate"><span class="pre">collections.defaultdict</span></code></a></p>
<p>Taken from <a class="reference external" href="http://stackoverflow.com/a/6190500/562769">http://stackoverflow.com/a/6190500/562769</a></p>
<p><strong>Methods:</strong></p>
<table class="autosummary longtable docutils align-default">
<tbody>
<tr class="row-odd"><td><p><a class="reference internal" href="#psyplot.utils.Defaultdict.copy" title="psyplot.utils.Defaultdict.copy"><code class="xref py py-obj docutils literal notranslate"><span class="pre">copy</span></code></a>()</p></td>
<td><p>Return a shallow copy of the dictionary</p></td>
</tr>
</tbody>
</table>
<dl class="py method">
<dt class="sig sig-object py" id="psyplot.utils.Defaultdict.copy">
<span class="sig-name descname"><span class="pre">copy</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/psyplot/utils.html#Defaultdict.copy"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#psyplot.utils.Defaultdict.copy" title="Link to this definition"></a></dt>
<dd><p>Return a shallow copy of the dictionary</p>
</dd></dl>
</dd></dl>
<dl class="py function">
<dt class="sig sig-object py" id="psyplot.utils.check_key">
<span class="sig-prename descclassname"><span class="pre">psyplot.utils.</span></span><span class="sig-name descname"><span class="pre">check_key</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">key</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">possible_keys</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">raise_error</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">True</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">name</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">'formatoption</span> <span class="pre">keyword'</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">msg</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">'See</span> <span class="pre">show_fmtkeys</span> <span class="pre">function</span> <span class="pre">for</span> <span class="pre">possible</span> <span class="pre">formatopion</span> <span class="pre">keywords'</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">*</span></span><span class="n"><span class="pre">args</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/psyplot/utils.html#check_key"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#psyplot.utils.check_key" title="Link to this definition"></a></dt>
<dd><p>Checks whether the key is in a list of possible keys</p>
<p>This function checks whether the given <cite>key</cite> is in <cite>possible_keys</cite> and if
not looks for similar sounding keys</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>key</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.12)"><em>str</em></a>) – Key to check</p></li>
<li><p><strong>possible_keys</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#list" title="(in Python v3.12)"><em>list</em></a><em> of </em><em>strings</em>) – a list of possible keys to use</p></li>
<li><p><strong>raise_error</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.12)"><em>bool</em></a>) – If not True, a list of similar keys is returned</p></li>
<li><p><strong>name</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.12)"><em>str</em></a>) – The name of the key that shall be used in the error message</p></li>
<li><p><strong>msg</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.12)"><em>str</em></a>) – The additional message that shall be used if no close match to
key is found</p></li>
<li><p><strong>*args</strong> – They are passed to the <a class="reference external" href="https://docs.python.org/3/library/difflib.html#difflib.get_close_matches" title="(in Python v3.12)"><code class="xref py py-func docutils literal notranslate"><span class="pre">difflib.get_close_matches()</span></code></a> function
(i.e. <cite>n</cite> to increase the number of returned similar keys and
<cite>cutoff</cite> to change the sensibility)</p></li>
<li><p><strong>**kwargs</strong> – They are passed to the <a class="reference external" href="https://docs.python.org/3/library/difflib.html#difflib.get_close_matches" title="(in Python v3.12)"><code class="xref py py-func docutils literal notranslate"><span class="pre">difflib.get_close_matches()</span></code></a> function
(i.e. <cite>n</cite> to increase the number of returned similar keys and
<cite>cutoff</cite> to change the sensibility)</p></li>
</ul>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p><ul class="simple">
<li><p><em>str</em> – The <cite>key</cite> if it is a valid string, else an empty string</p></li>
<li><p><em>list</em> – A list of similar formatoption strings (if found)</p></li>
<li><p><em>str</em> – An error message which includes</p></li>
</ul>
</p>
</dd>
<dt class="field-odd">Raises<span class="colon">:</span></dt>
<dd class="field-odd"><p><a class="reference external" href="https://docs.python.org/3/library/exceptions.html#KeyError" title="(in Python v3.12)"><strong>KeyError</strong></a> – If the key is not a valid formatoption and <cite>raise_error</cite> is True</p>
</dd>
</dl>
</dd></dl>
<dl class="py function">
<dt class="sig sig-object py" id="psyplot.utils.get_default_value">
<span class="sig-prename descclassname"><span class="pre">psyplot.utils.</span></span><span class="sig-name descname"><span class="pre">get_default_value</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">func</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">arg</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/psyplot/utils.html#get_default_value"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#psyplot.utils.get_default_value" title="Link to this definition"></a></dt>
<dd></dd></dl>
<dl class="py function">
<dt class="sig sig-object py" id="psyplot.utils.hashable">
<span class="sig-prename descclassname"><span class="pre">psyplot.utils.</span></span><span class="sig-name descname"><span class="pre">hashable</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">val</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/psyplot/utils.html#hashable"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#psyplot.utils.hashable" title="Link to this definition"></a></dt>
<dd><p>Test if <cite>val</cite> is hashable and if not, get it’s string representation</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>val</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#object" title="(in Python v3.12)"><em>object</em></a>) – Any (possibly not hashable) python object</p>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p>The given <cite>val</cite> if it is hashable or it’s string representation</p>
</dd>
<dt class="field-odd">Return type<span class="colon">:</span></dt>
<dd class="field-odd"><p>val or string</p>
</dd>
</dl>
</dd></dl>
<dl class="py function">
<dt class="sig sig-object py" id="psyplot.utils.is_iterable">
<span class="sig-prename descclassname"><span class="pre">psyplot.utils.</span></span><span class="sig-name descname"><span class="pre">is_iterable</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">iterable</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/psyplot/utils.html#is_iterable"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#psyplot.utils.is_iterable" title="Link to this definition"></a></dt>
<dd><p>Test if an object is iterable</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>iterable</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#object" title="(in Python v3.12)"><em>object</em></a>) – The object to test</p>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p>True, if the object is an iterable object</p>
</dd>
<dt class="field-odd">Return type<span class="colon">:</span></dt>
<dd class="field-odd"><p><a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.12)">bool</a></p>
</dd>
</dl>
</dd></dl>
<dl class="py function">
<dt class="sig sig-object py" id="psyplot.utils.is_remote_url">
<span class="sig-prename descclassname"><span class="pre">psyplot.utils.</span></span><span class="sig-name descname"><span class="pre">is_remote_url</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">path</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/psyplot/utils.html#is_remote_url"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#psyplot.utils.is_remote_url" title="Link to this definition"></a></dt>
<dd></dd></dl>
<dl class="py function">
<dt class="sig sig-object py" id="psyplot.utils.isstring">
<span class="sig-prename descclassname"><span class="pre">psyplot.utils.</span></span><span class="sig-name descname"><span class="pre">isstring</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">s</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/psyplot/utils.html#isstring"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#psyplot.utils.isstring" title="Link to this definition"></a></dt>
<dd></dd></dl>
<dl class="py function">
<dt class="sig sig-object py" id="psyplot.utils.join_dicts">
<span class="sig-prename descclassname"><span class="pre">psyplot.utils.</span></span><span class="sig-name descname"><span class="pre">join_dicts</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">dicts</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">delimiter</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">keep_all</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">False</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/psyplot/utils.html#join_dicts"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#psyplot.utils.join_dicts" title="Link to this definition"></a></dt>
<dd><p>Join multiple dictionaries into one</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>dicts</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#list" title="(in Python v3.12)"><em>list</em></a><em> of </em><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#dict" title="(in Python v3.12)"><em>dict</em></a>) – A list of dictionaries</p></li>
<li><p><strong>delimiter</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.12)"><em>str</em></a>) – The string that shall be used as the delimiter in case that there
are multiple values for one attribute in the arrays. If None, they
will be returned as sets</p></li>
<li><p><strong>keep_all</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.12)"><em>bool</em></a>) – If True, all formatoptions are kept. Otherwise only the intersection</p></li>
</ul>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p>The combined dictionary</p>
</dd>
<dt class="field-odd">Return type<span class="colon">:</span></dt>
<dd class="field-odd"><p><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#dict" title="(in Python v3.12)">dict</a></p>
</dd>
</dl>
</dd></dl>
<dl class="py function">
<dt class="sig sig-object py" id="psyplot.utils.plugin_entrypoints">
<span class="sig-prename descclassname"><span class="pre">psyplot.utils.</span></span><span class="sig-name descname"><span class="pre">plugin_entrypoints</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">group</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">'psyplot'</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">name</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">'name'</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/psyplot/utils.html#plugin_entrypoints"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#psyplot.utils.plugin_entrypoints" title="Link to this definition"></a></dt>
<dd><p>This utility function gets the entry points of the psyplot plugins</p>
</dd></dl>
<dl class="py function">
<dt class="sig sig-object py" id="psyplot.utils.sort_kwargs">
<span class="sig-prename descclassname"><span class="pre">psyplot.utils.</span></span><span class="sig-name descname"><span class="pre">sort_kwargs</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">kwargs</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">*</span></span><span class="n"><span class="pre">param_lists</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/psyplot/utils.html#sort_kwargs"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#psyplot.utils.sort_kwargs" title="Link to this definition"></a></dt>
<dd><p>Function to sort keyword arguments and sort them into dictionaries</p>
<p>This function returns dictionaries that contain the keyword arguments
from <cite>kwargs</cite> corresponding given iterables in <code class="docutils literal notranslate"><span class="pre">*params</span></code></p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>kwargs</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#dict" title="(in Python v3.12)"><em>dict</em></a>) – Original dictionary</p></li>
<li><p><strong>*param_lists</strong> – iterables of strings, each standing for a possible key in kwargs</p></li>
</ul>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
<dd class="field-even"><p>len(params) + 1 dictionaries. Each dictionary contains the items of
<cite>kwargs</cite> corresponding to the specified list in <code class="docutils literal notranslate"><span class="pre">*param_lists</span></code>. The
last dictionary contains the remaining items</p>
</dd>
<dt class="field-odd">Return type<span class="colon">:</span></dt>
<dd class="field-odd"><p><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#list" title="(in Python v3.12)">list</a></p>
</dd>
</dl>
</dd></dl>
<dl class="py function">
<dt class="sig sig-object py" id="psyplot.utils.unique_everseen">
<span class="sig-prename descclassname"><span class="pre">psyplot.utils.</span></span><span class="sig-name descname"><span class="pre">unique_everseen</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">iterable</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">key</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/psyplot/utils.html#unique_everseen"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#psyplot.utils.unique_everseen" title="Link to this definition"></a></dt>
<dd><p>List unique elements, preserving order. Remember all elements ever seen.</p>
<p>Function taken from <a class="reference external" href="https://docs.python.org/2/library/itertools.html">https://docs.python.org/2/library/itertools.html</a></p>
</dd></dl>
</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="psyplot.project.html" class="btn btn-neutral float-left" title="<no title>" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
<a href="psyplot.warning.html" class="btn btn-neutral float-right" title="<no title>" 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>