forked from arrayfire/arrayfire-python
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patharrayfire.graphics.html
More file actions
614 lines (556 loc) · 40.1 KB
/
arrayfire.graphics.html
File metadata and controls
614 lines (556 loc) · 40.1 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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>arrayfire.graphics module — ArrayFire Python documentation</title>
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="_static/alabaster.css" type="text/css" />
<link rel="stylesheet" type="text/css" href="_static/graphviz.css" />
<link rel="stylesheet" href="_static/style.css" type="text/css" />
<script id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
<script src="_static/jquery.js"></script>
<script src="_static/underscore.js"></script>
<script src="_static/doctools.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="stylesheet" href="_static/custom.css" type="text/css" />
<meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9" />
</head><body>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<div class="section" id="module-arrayfire.graphics">
<span id="arrayfire-graphics-module"></span><h1>arrayfire.graphics module<a class="headerlink" href="#module-arrayfire.graphics" title="Permalink to this headline">¶</a></h1>
<p>Graphics functions (plot, image, etc).</p>
<dl class="py class">
<dt id="arrayfire.graphics.Window">
<em class="property"><span class="pre">class</span> </em><code class="sig-prename descclassname"><span class="pre">arrayfire.graphics.</span></code><code class="sig-name descname"><span class="pre">Window</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">width</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">1280</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">height</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">720</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">title</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">'ArrayFire'</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/arrayfire/graphics.html#Window"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#arrayfire.graphics.Window" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p>
<p>Class to create the Window object.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><dl class="simple">
<dt><strong>width: optional: int. default: 1280.</strong></dt><dd><ul class="simple">
<li><p>Specifies the width of the window in pixels.</p></li>
</ul>
</dd>
<dt><strong>height: optional: int. default: 720.</strong></dt><dd><ul class="simple">
<li><p>Specifies the height of the window in pixels.</p></li>
</ul>
</dd>
<dt><strong>title: optional: str. default: “ArrayFire”.</strong></dt><dd><ul class="simple">
<li><p>Specifies the title used for the window.</p></li>
</ul>
</dd>
</dl>
</dd>
</dl>
<p class="rubric">Methods</p>
<table class="longtable docutils align-default">
<colgroup>
<col style="width: 10%" />
<col style="width: 90%" />
</colgroup>
<tbody>
<tr class="row-odd"><td><p><a class="reference internal" href="#arrayfire.graphics.Window.close" title="arrayfire.graphics.Window.close"><code class="xref py py-obj docutils literal notranslate"><span class="pre">close</span></code></a>()</p></td>
<td><p>Close the window.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="#arrayfire.graphics.Window.grid" title="arrayfire.graphics.Window.grid"><code class="xref py py-obj docutils literal notranslate"><span class="pre">grid</span></code></a>(rows, cols)</p></td>
<td><p>Create a grid for sub plotting within the window.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="#arrayfire.graphics.Window.hist" title="arrayfire.graphics.Window.hist"><code class="xref py py-obj docutils literal notranslate"><span class="pre">hist</span></code></a>(X, min_val, max_val[, title])</p></td>
<td><p>Display a histogram Plot.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="#arrayfire.graphics.Window.image" title="arrayfire.graphics.Window.image"><code class="xref py py-obj docutils literal notranslate"><span class="pre">image</span></code></a>(img[, title])</p></td>
<td><p>Display an arrayfire array as an image.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="#arrayfire.graphics.Window.plot" title="arrayfire.graphics.Window.plot"><code class="xref py py-obj docutils literal notranslate"><span class="pre">plot</span></code></a>(X, Y[, Z, line, title])</p></td>
<td><p>Display a 2D or 3D Plot.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="#arrayfire.graphics.Window.plot2" title="arrayfire.graphics.Window.plot2"><code class="xref py py-obj docutils literal notranslate"><span class="pre">plot2</span></code></a>(line[, title])</p></td>
<td><p>Display a 2D Plot.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="#arrayfire.graphics.Window.plot3" title="arrayfire.graphics.Window.plot3"><code class="xref py py-obj docutils literal notranslate"><span class="pre">plot3</span></code></a>([X, Y, Z, line, title])</p></td>
<td><p>Display a 3D Plot.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="#arrayfire.graphics.Window.scatter" title="arrayfire.graphics.Window.scatter"><code class="xref py py-obj docutils literal notranslate"><span class="pre">scatter</span></code></a>(X, Y[, Z, points, marker, title])</p></td>
<td><p>Renders input arrays as 2D or 3D scatter plot.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="#arrayfire.graphics.Window.scatter2" title="arrayfire.graphics.Window.scatter2"><code class="xref py py-obj docutils literal notranslate"><span class="pre">scatter2</span></code></a>(points[, marker, title])</p></td>
<td><p>Renders the input array as a 2D Scatter plot.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="#arrayfire.graphics.Window.scatter3" title="arrayfire.graphics.Window.scatter3"><code class="xref py py-obj docutils literal notranslate"><span class="pre">scatter3</span></code></a>(points[, marker, title])</p></td>
<td><p>Renders the input array as a 3D Scatter plot.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="#arrayfire.graphics.Window.set_axes_label_format" title="arrayfire.graphics.Window.set_axes_label_format"><code class="xref py py-obj docutils literal notranslate"><span class="pre">set_axes_label_format</span></code></a>([xformat, yformat, …])</p></td>
<td><p>Set axis limits.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="#arrayfire.graphics.Window.set_axes_limits" title="arrayfire.graphics.Window.set_axes_limits"><code class="xref py py-obj docutils literal notranslate"><span class="pre">set_axes_limits</span></code></a>(xmin, xmax, ymin, ymax[, …])</p></td>
<td><p>Set axis limits.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="#arrayfire.graphics.Window.set_colormap" title="arrayfire.graphics.Window.set_colormap"><code class="xref py py-obj docutils literal notranslate"><span class="pre">set_colormap</span></code></a>(cmap)</p></td>
<td><p>Set the colormap for the window.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="#arrayfire.graphics.Window.set_pos" title="arrayfire.graphics.Window.set_pos"><code class="xref py py-obj docutils literal notranslate"><span class="pre">set_pos</span></code></a>(x, y)</p></td>
<td><p>Set the position of window on the screen.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="#arrayfire.graphics.Window.set_size" title="arrayfire.graphics.Window.set_size"><code class="xref py py-obj docutils literal notranslate"><span class="pre">set_size</span></code></a>(w, h)</p></td>
<td><p>Set the windo height and width.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="#arrayfire.graphics.Window.set_title" title="arrayfire.graphics.Window.set_title"><code class="xref py py-obj docutils literal notranslate"><span class="pre">set_title</span></code></a>(title)</p></td>
<td><p>Set the title of the window</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="#arrayfire.graphics.Window.set_visibility" title="arrayfire.graphics.Window.set_visibility"><code class="xref py py-obj docutils literal notranslate"><span class="pre">set_visibility</span></code></a>()</p></td>
<td><p>A flag that shows or hides the window as requested.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="#arrayfire.graphics.Window.show" title="arrayfire.graphics.Window.show"><code class="xref py py-obj docutils literal notranslate"><span class="pre">show</span></code></a>()</p></td>
<td><p>Force the window to display the contents.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="#arrayfire.graphics.Window.surface" title="arrayfire.graphics.Window.surface"><code class="xref py py-obj docutils literal notranslate"><span class="pre">surface</span></code></a>(x_vals, y_vals, z_vals[, title])</p></td>
<td><p>Renders the input array as a 3D surface plot.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="#arrayfire.graphics.Window.vector_field" title="arrayfire.graphics.Window.vector_field"><code class="xref py py-obj docutils literal notranslate"><span class="pre">vector_field</span></code></a>(xpoints, xdirs, ypoints, ydirs)</p></td>
<td><p>Display a 2D or 3D Vector_Field.</p></td>
</tr>
</tbody>
</table>
<dl class="py method">
<dt id="arrayfire.graphics.Window.close">
<code class="sig-name descname"><span class="pre">close</span></code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/arrayfire/graphics.html#Window.close"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#arrayfire.graphics.Window.close" title="Permalink to this definition">¶</a></dt>
<dd><p>Close the window.</p>
</dd></dl>
<dl class="py method">
<dt id="arrayfire.graphics.Window.grid">
<code class="sig-name descname"><span class="pre">grid</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">rows</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">cols</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/arrayfire/graphics.html#Window.grid"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#arrayfire.graphics.Window.grid" title="Permalink to this definition">¶</a></dt>
<dd><p>Create a grid for sub plotting within the window.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><dl class="simple">
<dt><strong>rows: int.</strong></dt><dd><p>Number of rows in the grid.</p>
</dd>
<dt><strong>cols: int.</strong></dt><dd><p>Number of columns in the grid.</p>
</dd>
</dl>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="arrayfire.graphics.Window.hist">
<code class="sig-name descname"><span class="pre">hist</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">X</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">min_val</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">max_val</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">title</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/arrayfire/graphics.html#Window.hist"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#arrayfire.graphics.Window.hist" title="Permalink to this definition">¶</a></dt>
<dd><p>Display a histogram Plot.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><dl class="simple">
<dt><strong>X: af.Array.</strong></dt><dd><p>A 1 dimensional array containing the histogram.</p>
</dd>
<dt><strong>min_val: scalar.</strong></dt><dd><p>A scalar value specifying the lower bound of the histogram.</p>
</dd>
<dt><strong>max_val: scalar.</strong></dt><dd><p>A scalar value specifying the upper bound of the histogram.</p>
</dd>
<dt><strong>title: str.</strong></dt><dd><p>Title used for the histogram.</p>
</dd>
</dl>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="arrayfire.graphics.Window.image">
<code class="sig-name descname"><span class="pre">image</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">img</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">title</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/arrayfire/graphics.html#Window.image"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#arrayfire.graphics.Window.image" title="Permalink to this definition">¶</a></dt>
<dd><p>Display an arrayfire array as an image.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><dl class="simple">
<dt><strong>img: af.Array.</strong></dt><dd><p>A 2 dimensional array for single channel image.
A 3 dimensional array for 3 channel image.</p>
</dd>
<dt><strong>title: str.</strong></dt><dd><p>Title used for the image.</p>
</dd>
</dl>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="arrayfire.graphics.Window.plot">
<code class="sig-name descname"><span class="pre">plot</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">X</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">Y</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">Z</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">line</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">title</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/arrayfire/graphics.html#Window.plot"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#arrayfire.graphics.Window.plot" title="Permalink to this definition">¶</a></dt>
<dd><p>Display a 2D or 3D Plot.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><dl class="simple">
<dt><strong>X: af.Array.</strong></dt><dd><ul class="simple">
<li><p>A 1 dimensional array containing X co-ordinates.</p></li>
<li><p>Not used if line is not None</p></li>
</ul>
</dd>
<dt><strong>Y: af.Array.</strong></dt><dd><ul class="simple">
<li><p>A 1 dimensional array containing Y co-ordinates.</p></li>
<li><p>Not used if line is not None</p></li>
</ul>
</dd>
<dt><strong>Z: optional: af.Array. default: None.</strong></dt><dd><ul class="simple">
<li><p>A 1 dimensional array containing Z co-ordinates.</p></li>
<li><p>Not used if line is not None</p></li>
</ul>
</dd>
<dt><strong>line: optional: af.Array. default: None.</strong></dt><dd><ul class="simple">
<li><p>A 2 dimensional array of size [n 2]. Each column denotes X and Y co-ordinates for plotting 2D lines.</p></li>
<li><p>A 3 dimensional array of size [n 3]. Each column denotes X, Y, and Z co-ordinates for plotting 3D lines.</p></li>
</ul>
</dd>
<dt><strong>title: str.</strong></dt><dd><p>Title used for the plot.</p>
</dd>
</dl>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="arrayfire.graphics.Window.plot2">
<code class="sig-name descname"><span class="pre">plot2</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">line</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">title</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/arrayfire/graphics.html#Window.plot2"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#arrayfire.graphics.Window.plot2" title="Permalink to this definition">¶</a></dt>
<dd><p>Display a 2D Plot.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><dl class="simple">
<dt><strong>line: af.Array.</strong></dt><dd><ul class="simple">
<li><p>A 2 dimensional array of size [n 2]. Each column denotes X, and Y co-ordinates for plotting 2D lines.</p></li>
</ul>
</dd>
<dt><strong>title: str.</strong></dt><dd><p>Title used for the plot.</p>
</dd>
</dl>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="arrayfire.graphics.Window.plot3">
<code class="sig-name descname"><span class="pre">plot3</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">X</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">Y</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">Z</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">line</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">title</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/arrayfire/graphics.html#Window.plot3"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#arrayfire.graphics.Window.plot3" title="Permalink to this definition">¶</a></dt>
<dd><p>Display a 3D Plot.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><dl class="simple">
<dt><strong>line: af.Array.</strong></dt><dd><ul class="simple">
<li><p>A 3 dimensional array of size [n 3]. Each column denotes X, Y, and Z co-ordinates for plotting 3D lines.</p></li>
</ul>
</dd>
<dt><strong>title: str.</strong></dt><dd><p>Title used for the plot.</p>
</dd>
</dl>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="arrayfire.graphics.Window.scatter">
<code class="sig-name descname"><span class="pre">scatter</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="pre">X</span></em>, <em class="sig-param"><span class="pre">Y</span></em>, <em class="sig-param"><span class="pre">Z=None</span></em>, <em class="sig-param"><span class="pre">points=None</span></em>, <em class="sig-param"><span class="pre">marker=<MARKER.POINT:</span> <span class="pre">1></span></em>, <em class="sig-param"><span class="pre">title=None</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/arrayfire/graphics.html#Window.scatter"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#arrayfire.graphics.Window.scatter" title="Permalink to this definition">¶</a></dt>
<dd><p>Renders input arrays as 2D or 3D scatter plot.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><dl class="simple">
<dt><strong>X: af.Array.</strong></dt><dd><p>A 1 dimensional array containing X co-ordinates.</p>
</dd>
<dt><strong>Y: af.Array.</strong></dt><dd><p>A 1 dimensional array containing Y co-ordinates.</p>
</dd>
<dt><strong>Z: optional: af.Array. default: None.</strong></dt><dd><ul class="simple">
<li><p>A 1 dimensional array containing Z co-ordinates.</p></li>
<li><p>Not used if line is not None</p></li>
</ul>
</dd>
<dt><strong>points: optional: af.Array. default: None.</strong></dt><dd><ul class="simple">
<li><p>A 2 dimensional array of size [n 2]. Each column denotes X and Y co-ordinates for 2D scatter plot.</p></li>
<li><p>A 3 dimensional array of size [n 3]. Each column denotes X, Y, and Z co-ordinates for 3D scatter plot.</p></li>
</ul>
</dd>
<dt><strong>marker: af.MARKER</strong></dt><dd><p>Specifies how the points look</p>
</dd>
<dt><strong>title: str.</strong></dt><dd><p>Title used for the plot.</p>
</dd>
</dl>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="arrayfire.graphics.Window.scatter2">
<code class="sig-name descname"><span class="pre">scatter2</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="pre">points</span></em>, <em class="sig-param"><span class="pre">marker=<MARKER.POINT:</span> <span class="pre">1></span></em>, <em class="sig-param"><span class="pre">title=None</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/arrayfire/graphics.html#Window.scatter2"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#arrayfire.graphics.Window.scatter2" title="Permalink to this definition">¶</a></dt>
<dd><p>Renders the input array as a 2D Scatter plot.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><dl class="simple">
<dt><strong>points: af.Array.</strong></dt><dd><p>A 2 dimensional array containing (X,Y) co-ordinates.</p>
</dd>
<dt><strong>marker: af.MARKER</strong></dt><dd><p>Specifies how the points look</p>
</dd>
<dt><strong>title: str.</strong></dt><dd><p>Title used for the plot.</p>
</dd>
</dl>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="arrayfire.graphics.Window.scatter3">
<code class="sig-name descname"><span class="pre">scatter3</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="pre">points</span></em>, <em class="sig-param"><span class="pre">marker=<MARKER.POINT:</span> <span class="pre">1></span></em>, <em class="sig-param"><span class="pre">title=None</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/arrayfire/graphics.html#Window.scatter3"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#arrayfire.graphics.Window.scatter3" title="Permalink to this definition">¶</a></dt>
<dd><p>Renders the input array as a 3D Scatter plot.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><dl class="simple">
<dt><strong>points: af.Array.</strong></dt><dd><p>A 2 dimensional array containing (X,Y,Z) co-ordinates.</p>
</dd>
<dt><strong>marker: af.MARKER</strong></dt><dd><p>Specifies how the points look</p>
</dd>
<dt><strong>title: str.</strong></dt><dd><p>Title used for the plot.</p>
</dd>
</dl>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="arrayfire.graphics.Window.set_axes_label_format">
<code class="sig-name descname"><span class="pre">set_axes_label_format</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">xformat</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">'4.1%f'</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">yformat</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">'4.1%f'</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">zformat</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">'4.1%f'</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/arrayfire/graphics.html#Window.set_axes_label_format"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#arrayfire.graphics.Window.set_axes_label_format" title="Permalink to this definition">¶</a></dt>
<dd><p>Set axis limits.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><dl class="simple">
<dt><strong>xformat</strong><span class="classifier">str.</span></dt><dd><dl class="simple">
<dt>default: “4.1%f”.</dt><dd><p>is a printf-style format specifier for x-axis</p>
</dd>
</dl>
</dd>
<dt><strong>yformat</strong><span class="classifier">str.</span></dt><dd><dl class="simple">
<dt>default: “4.1%f”.</dt><dd><p>is a printf-style format specifier for y-axis</p>
</dd>
</dl>
</dd>
<dt><strong>zformat</strong><span class="classifier">str.</span></dt><dd><dl class="simple">
<dt>default: “4.1%f”.</dt><dd><p>is a printf-style format specifier for z-axis</p>
</dd>
</dl>
</dd>
</dl>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="arrayfire.graphics.Window.set_axes_limits">
<code class="sig-name descname"><span class="pre">set_axes_limits</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">xmin</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">xmax</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">ymin</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">ymax</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">zmin</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">zmax</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">exact</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/arrayfire/graphics.html#Window.set_axes_limits"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#arrayfire.graphics.Window.set_axes_limits" title="Permalink to this definition">¶</a></dt>
<dd><p>Set axis limits.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><dl class="simple">
<dt><strong>xmin</strong><span class="classifier">af.Array.</span></dt><dd><ul class="simple">
<li><p>lower limit of the x axis.</p></li>
</ul>
</dd>
<dt><strong>xmax</strong><span class="classifier">af.Array.</span></dt><dd><ul class="simple">
<li><p>upper limit of the x axis.</p></li>
</ul>
</dd>
<dt><strong>ymin</strong><span class="classifier">af.Array.</span></dt><dd><ul class="simple">
<li><p>lower limit of the y axis.</p></li>
</ul>
</dd>
<dt><strong>ymax</strong><span class="classifier">af.Array.</span></dt><dd><ul class="simple">
<li><p>upper limit of the y axis.</p></li>
</ul>
</dd>
<dt><strong>zmin</strong><span class="classifier">optional: af.Array. default: None.</span></dt><dd><ul class="simple">
<li><p>lower limit of the z axis.</p></li>
</ul>
</dd>
<dt><strong>zmax</strong><span class="classifier">optional: af.Array. default: None.</span></dt><dd><ul class="simple">
<li><p>upper limit of the z axis.</p></li>
</ul>
</dd>
<dt><strong>title</strong><span class="classifier">str.</span></dt><dd><p>Title used for the plot.</p>
</dd>
</dl>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="arrayfire.graphics.Window.set_colormap">
<code class="sig-name descname"><span class="pre">set_colormap</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">cmap</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/arrayfire/graphics.html#Window.set_colormap"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#arrayfire.graphics.Window.set_colormap" title="Permalink to this definition">¶</a></dt>
<dd><p>Set the colormap for the window.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><dl class="simple">
<dt><strong>cmap</strong><span class="classifier">af.COLORMAP.</span></dt><dd><p>Set the colormap for the window.</p>
</dd>
</dl>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="arrayfire.graphics.Window.set_pos">
<code class="sig-name descname"><span class="pre">set_pos</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">x</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">y</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/arrayfire/graphics.html#Window.set_pos"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#arrayfire.graphics.Window.set_pos" title="Permalink to this definition">¶</a></dt>
<dd><p>Set the position of window on the screen.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><dl class="simple">
<dt><strong>x</strong><span class="classifier">int.</span></dt><dd><p>Pixel offset from left.</p>
</dd>
<dt><strong>y</strong><span class="classifier">int.</span></dt><dd><p>Pixel offset from top</p>
</dd>
</dl>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="arrayfire.graphics.Window.set_size">
<code class="sig-name descname"><span class="pre">set_size</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">w</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">h</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/arrayfire/graphics.html#Window.set_size"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#arrayfire.graphics.Window.set_size" title="Permalink to this definition">¶</a></dt>
<dd><p>Set the windo height and width.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><dl class="simple">
<dt><strong>w</strong><span class="classifier">int</span></dt><dd><p>Width if window.</p>
</dd>
<dt><strong>h</strong><span class="classifier">int</span></dt><dd><p>Height of window.</p>
</dd>
</dl>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="arrayfire.graphics.Window.set_title">
<code class="sig-name descname"><span class="pre">set_title</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">title</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/arrayfire/graphics.html#Window.set_title"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#arrayfire.graphics.Window.set_title" title="Permalink to this definition">¶</a></dt>
<dd><p>Set the title of the window</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><dl class="simple">
<dt><strong>title</strong><span class="classifier">str.</span></dt><dd><p>Title used for the current window.</p>
</dd>
</dl>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="arrayfire.graphics.Window.set_visibility">
<code class="sig-name descname"><span class="pre">set_visibility</span></code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/arrayfire/graphics.html#Window.set_visibility"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#arrayfire.graphics.Window.set_visibility" title="Permalink to this definition">¶</a></dt>
<dd><p>A flag that shows or hides the window as requested.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><dl class="simple">
<dt><strong>is_visible: Flag specifying the visibility of the flag.</strong></dt><dd></dd>
</dl>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="arrayfire.graphics.Window.show">
<code class="sig-name descname"><span class="pre">show</span></code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/arrayfire/graphics.html#Window.show"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#arrayfire.graphics.Window.show" title="Permalink to this definition">¶</a></dt>
<dd><p>Force the window to display the contents.</p>
<p>Note: This is only needed when using the window as a grid.</p>
</dd></dl>
<dl class="py method">
<dt id="arrayfire.graphics.Window.surface">
<code class="sig-name descname"><span class="pre">surface</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">x_vals</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">y_vals</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">z_vals</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">title</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/arrayfire/graphics.html#Window.surface"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#arrayfire.graphics.Window.surface" title="Permalink to this definition">¶</a></dt>
<dd><p>Renders the input array as a 3D surface plot.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><dl class="simple">
<dt><strong>x_vals: af.Array.</strong></dt><dd><p>A 1 dimensional array containing X co-ordinates.</p>
</dd>
<dt><strong>y_vals: af.Array.</strong></dt><dd><p>A 1 dimensional array containing Y co-ordinates.</p>
</dd>
<dt><strong>z_vals: af.Array.</strong></dt><dd><p>A 1 dimensional array containing Z co-ordinates.</p>
</dd>
<dt><strong>title: str.</strong></dt><dd><p>Title used for the plot.</p>
</dd>
</dl>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="arrayfire.graphics.Window.vector_field">
<code class="sig-name descname"><span class="pre">vector_field</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">xpoints</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">xdirs</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">ypoints</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">ydirs</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">zpoints</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">zdirs</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">points</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">dirs</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">title</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/arrayfire/graphics.html#Window.vector_field"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#arrayfire.graphics.Window.vector_field" title="Permalink to this definition">¶</a></dt>
<dd><p>Display a 2D or 3D Vector_Field.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><dl class="simple">
<dt><strong>xpoints</strong><span class="classifier">af.Array.</span></dt><dd><ul class="simple">
<li><p>A 1 dimensional array containing X co-ordinates.</p></li>
<li><p>Not used if points is not None</p></li>
</ul>
</dd>
<dt><strong>xdirs</strong><span class="classifier">af.Array.</span></dt><dd><ul class="simple">
<li><p>A 1 dimensional array specifying direction at current location.</p></li>
<li><p>Not used if dirs is not None</p></li>
</ul>
</dd>
<dt><strong>ypoints</strong><span class="classifier">af.Array.</span></dt><dd><ul class="simple">
<li><p>A 1 dimensional array containing Y co-ordinates.</p></li>
<li><p>Not used if points is not None</p></li>
</ul>
</dd>
<dt><strong>ydirs</strong><span class="classifier">af.Array.</span></dt><dd><ul class="simple">
<li><p>A 1 dimensional array specifying direction at current location.</p></li>
<li><p>Not used if dirs is not None</p></li>
</ul>
</dd>
<dt><strong>zpoints</strong><span class="classifier">optional: af.Array. default: None.</span></dt><dd><ul class="simple">
<li><p>A 1 dimensional array containing Z co-ordinates.</p></li>
<li><p>Not used if points is not None</p></li>
</ul>
</dd>
<dt><strong>zdirs</strong><span class="classifier">optional: af.Array. default: none.</span></dt><dd><ul class="simple">
<li><p>A 1 dimensional array specifying direction at current location.</p></li>
<li><p>Not used if dirs is not None</p></li>
</ul>
</dd>
<dt><strong>points</strong><span class="classifier">optional: af.Array. default: None.</span></dt><dd><ul class="simple">
<li><p>A 2 dimensional array of size [n 2]. Each column denotes X and Y co-ordinates for plotting 2D lines.</p></li>
<li><p>A 3 dimensional array of size [n 3]. Each column denotes X, Y, and Z co-ordinates for plotting 3D lines.</p></li>
</ul>
</dd>
<dt><strong>dirs</strong><span class="classifier">optional: af.Array. default: None.</span></dt><dd><ul class="simple">
<li><p>A 2 dimensional array of size [n 2]. Each column denotes X and Y directions for plotting 2D lines.</p></li>
<li><p>A 3 dimensional array of size [n 3]. Each column denotes X, Y, and Z directions for plotting 3D lines.</p></li>
</ul>
</dd>
<dt><strong>title</strong><span class="classifier">str.</span></dt><dd><p>Title used for the plot.</p>
</dd>
</dl>
</dd>
</dl>
</dd></dl>
</dd></dl>
</div>
</div>
</div>
</div>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<p class="logo"><a href="index.html">
<img class="logo" src="_static/arrayfire_logo_symbol.png" alt="Logo"/>
</a></p>
<h1 class="logo"><a href="index.html">ArrayFire</a></h1>
<h3>Navigation</h3>
<div class="relations">
<h3>Related Topics</h3>
<ul>
<li><a href="index.html">Documentation overview</a><ul>
</ul></li>
</ul>
</div>
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" />
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>$('#searchbox').show(0);</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="footer">
©2020, ArrayFire.
|
Powered by <a href="http://sphinx-doc.org/">Sphinx 3.5.1</a>
& <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.12</a>
|
<a href="_sources/arrayfire.graphics.rst.txt"
rel="nofollow">Page source</a>
</div>
</body>
</html>