pytecplot 1.5.2__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (97) hide show
  1. pytecplot-1.5.2.dist-info/LICENSE.html +77 -0
  2. pytecplot-1.5.2.dist-info/METADATA +508 -0
  3. pytecplot-1.5.2.dist-info/RECORD +97 -0
  4. pytecplot-1.5.2.dist-info/WHEEL +5 -0
  5. pytecplot-1.5.2.dist-info/top_level.txt +1 -0
  6. tecplot/__init__.py +94 -0
  7. tecplot/annotation/__init__.py +7 -0
  8. tecplot/annotation/annotation.py +223 -0
  9. tecplot/annotation/geometry.py +369 -0
  10. tecplot/annotation/georeference.py +33 -0
  11. tecplot/annotation/image.py +185 -0
  12. tecplot/annotation/iter.py +105 -0
  13. tecplot/annotation/polyline.py +381 -0
  14. tecplot/annotation/text.py +744 -0
  15. tecplot/constant.py +401 -0
  16. tecplot/data/__init__.py +34 -0
  17. tecplot/data/array.py +645 -0
  18. tecplot/data/create.py +1 -0
  19. tecplot/data/dataset.py +1809 -0
  20. tecplot/data/extract.py +544 -0
  21. tecplot/data/face_neighbors.py +494 -0
  22. tecplot/data/facemap.py +814 -0
  23. tecplot/data/load.py +2075 -0
  24. tecplot/data/nodemap.py +577 -0
  25. tecplot/data/operate.py +928 -0
  26. tecplot/data/query.py +334 -0
  27. tecplot/data/save.py +343 -0
  28. tecplot/data/variable.py +280 -0
  29. tecplot/data/zone.py +841 -0
  30. tecplot/exception.py +201 -0
  31. tecplot/export/__init__.py +13 -0
  32. tecplot/export/animation.py +521 -0
  33. tecplot/export/export_setup.py +318 -0
  34. tecplot/export/image.py +577 -0
  35. tecplot/export/print_setup.py +218 -0
  36. tecplot/export/time_animation.py +607 -0
  37. tecplot/extension/__init__.py +14 -0
  38. tecplot/extension/ipython.py +68 -0
  39. tecplot/layout/__init__.py +20 -0
  40. tecplot/layout/frame.py +1285 -0
  41. tecplot/layout/layout.py +488 -0
  42. tecplot/layout/page.py +541 -0
  43. tecplot/legend/__init__.py +4 -0
  44. tecplot/legend/contour_legend.py +516 -0
  45. tecplot/legend/legend.py +141 -0
  46. tecplot/legend/line_legend.py +66 -0
  47. tecplot/legend/rgb_coloring_legend.py +291 -0
  48. tecplot/legend/scatter_legend.py +136 -0
  49. tecplot/macro.py +339 -0
  50. tecplot/plot/__init__.py +62 -0
  51. tecplot/plot/axes.py +881 -0
  52. tecplot/plot/axis.py +1350 -0
  53. tecplot/plot/blanking.py +584 -0
  54. tecplot/plot/contour.py +1302 -0
  55. tecplot/plot/effects.py +162 -0
  56. tecplot/plot/fieldmap.py +2159 -0
  57. tecplot/plot/grid.py +758 -0
  58. tecplot/plot/isosurface.py +1167 -0
  59. tecplot/plot/labels.py +338 -0
  60. tecplot/plot/linemap.py +1905 -0
  61. tecplot/plot/linking.py +489 -0
  62. tecplot/plot/plot.py +1791 -0
  63. tecplot/plot/rgb_coloring.py +281 -0
  64. tecplot/plot/scatter.py +396 -0
  65. tecplot/plot/slice.py +1544 -0
  66. tecplot/plot/streamtrace.py +1949 -0
  67. tecplot/plot/symbol.py +567 -0
  68. tecplot/plot/ticks.py +666 -0
  69. tecplot/plot/title.py +380 -0
  70. tecplot/plot/vector.py +679 -0
  71. tecplot/plot/view.py +868 -0
  72. tecplot/session/__init__.py +112 -0
  73. tecplot/session/aux_data.py +276 -0
  74. tecplot/session/config.py +92 -0
  75. tecplot/session/session.py +425 -0
  76. tecplot/session/state_changed.py +225 -0
  77. tecplot/session/style.py +504 -0
  78. tecplot/tecutil/__init__.py +16 -0
  79. tecplot/tecutil/arglist.py +230 -0
  80. tecplot/tecutil/captured_output.py +177 -0
  81. tecplot/tecutil/constant.py +1312 -0
  82. tecplot/tecutil/index_set.py +118 -0
  83. tecplot/tecutil/lock.py +36 -0
  84. tecplot/tecutil/message_pb2.py +39 -0
  85. tecplot/tecutil/preamble.py +54 -0
  86. tecplot/tecutil/stringlist.py +114 -0
  87. tecplot/tecutil/sv.py +1662 -0
  88. tecplot/tecutil/tecutil.py +12402 -0
  89. tecplot/tecutil/tecutil_client.py +627 -0
  90. tecplot/tecutil/tecutil_connector.py +937 -0
  91. tecplot/tecutil/tecutil_rpc.py +6845 -0
  92. tecplot/tecutil/util.py +332 -0
  93. tecplot/text/__init__.py +3 -0
  94. tecplot/text/font.py +224 -0
  95. tecplot/text/label_format.py +374 -0
  96. tecplot/text/textbox.py +106 -0
  97. tecplot/version.py +41 -0
@@ -0,0 +1,584 @@
1
+ from builtins import super
2
+
3
+ from ..tecutil import sv
4
+ from .. import constant, exception, session, tecutil
5
+
6
+
7
+ class ValueBlankingConstraint(session.Style):
8
+ """Value blanking constraint for cartesian 3D and line plots.
9
+
10
+ .. seealso:: `ValueBlankingCartesian3D`
11
+ """
12
+ def __init__(self, blanking, index):
13
+ if __debug__:
14
+ if index < 0 or index > 7:
15
+ raise exception.TecplotIndexError
16
+ self.blanking = blanking
17
+ super().__init__(blanking._sv, sv.CONSTRAINT,
18
+ offset1=tecutil.Index(index),
19
+ uniqueid=blanking.plot.frame.uid)
20
+
21
+ @property
22
+ def variable_index(self):
23
+ """`Index`: Index of the `Variable` to be blanked.
24
+
25
+ Example usage::
26
+
27
+ >>> from tecplot.constant import ConstraintOp2Mode
28
+ >>> constraint = plot.value_blanking.constraint(0)
29
+ >>> constraint.compare_by = ConstraintOp2Mode.UseVar
30
+ >>> constraint.variable_index = 1
31
+ """
32
+ return self._get_style(tecutil.Index, sv.VARA)
33
+
34
+ @variable_index.setter
35
+ def variable_index(self, value):
36
+ self._set_style(tecutil.Index(value), sv.VARA)
37
+
38
+ @property
39
+ def variable(self):
40
+ """`Variable`: The `Variable` to be blanked.
41
+
42
+ Example usage::
43
+
44
+ >>> from tecplot.constant import ConstraintOp2Mode
45
+ >>> constraint = plot.value_blanking.constraint(0)
46
+ >>> constraint.compare_by = ConstraintOp2Mode.UseVar
47
+ >>> constraint.variable = dataset.variable('s')
48
+ """
49
+ return self.blanking.plot.frame.dataset.variable(self.variable_index)
50
+
51
+ @variable.setter
52
+ def variable(self, value):
53
+ self.variable_index = value.index
54
+
55
+ @property
56
+ def comparison_value(self):
57
+ """`float`: Constant value for blanking.
58
+
59
+ The variable will be blanked according to this constant value, using
60
+ the `comparison_operator` for this constraint, when the `compare_by`
61
+ attribute is set to `ConstraintOp2Mode.UseConstant`::
62
+
63
+ >>> from tecplot.constant import ConstraintOp2Mode, RelOp
64
+ >>> constraint = plot.value_blanking.constraint(0)
65
+ >>> constraint.active = True
66
+ >>> constraint.compare_by = ConstraintOp2Mode.UseConstant
67
+ >>> constraint.comparison_operator = RelOp.LessThanOrEqual
68
+ >>> constraint.comparison_value = 3.14
69
+ """
70
+ return self._get_style(float, sv.VALUECUTOFF)
71
+
72
+ @comparison_value.setter
73
+ def comparison_value(self, value):
74
+ self._set_style(float(value), sv.VALUECUTOFF)
75
+
76
+ @property
77
+ def comparison_variable_index(self):
78
+ """`Index`: `Index` of the `Variable` to determine when to blank.
79
+
80
+ The variable will be blanked according to values in this "comparison"
81
+ variable, using the `comparison_operator` for this constraint, when the
82
+ `compare_by` attribute is set to `ConstraintOp2Mode.UseVar`::
83
+
84
+ >>> from tecplot.constant import ConstraintOp2Mode, RelOp
85
+ >>> constraint = plot.value_blanking.constraint(0)
86
+ >>> constraint.active = True
87
+ >>> constraint.compare_by = ConstraintOp2Mode.UseVar
88
+ >>> constraint.comparison_operator = RelOp.LessThanOrEqual
89
+ >>> constraint.comparison_variable_index = 2
90
+ """
91
+ return self._get_style(tecutil.Index, sv.VARB)
92
+
93
+ @comparison_variable_index.setter
94
+ def comparison_variable_index(self, value):
95
+ self._set_style(tecutil.Index(value), sv.VARB)
96
+
97
+ @property
98
+ def comparison_variable(self):
99
+ """`Variable`: The `Variable` to determine when to blank.
100
+
101
+ The variable will be blanked according to values in this "comparison"
102
+ variable, using the `comparison_operator` for this constraint, when the
103
+ `compare_by` attribute is set to `ConstraintOp2Mode.UseVar`::
104
+
105
+ >>> from tecplot.constant import ConstraintOp2Mode, RelOp
106
+ >>> constraint = plot.value_blanking.constraint(0)
107
+ >>> constraint.active = True
108
+ >>> constraint.compare_by = ConstraintOp2Mode.UseVar
109
+ >>> constraint.comparison_operator = RelOp.LessThanOrEqual
110
+ >>> constraint.comparison_variable = dataset.variable('s')
111
+ """
112
+ return self.blanking.plot.frame.dataset.variable(
113
+ self.comparison_variable_index)
114
+
115
+ @comparison_variable.setter
116
+ def comparison_variable(self, value):
117
+ self.comparison_variable_index = value.index
118
+
119
+ @property
120
+ def compare_by(self):
121
+ """`ConstraintOp2Mode`: Compare against a constant or `Variable`.
122
+
123
+ This controls what is used in the comparison for blanking. Possible
124
+ values are: `ConstraintOp2Mode.UseConstant` and
125
+ `ConstraintOp2Mode.UseVar`::
126
+
127
+ >>> from tecplot.constant import ConstraintOp2Mode, RelOp
128
+ >>> constraint = plot.value_blanking.constraint(0)
129
+ >>> constraint.active = True
130
+ >>> constraint.compare_by = ConstraintOp2Mode.UseConstant
131
+ >>> constraint.comparison_operator = RelOp.LessThanOrEqual
132
+ >>> constraint.comparison_value = 3.14
133
+ """
134
+ return self._get_style(constant.ConstraintOp2Mode,
135
+ sv.CONSTRAINTOP2MODE)
136
+
137
+ @compare_by.setter
138
+ def compare_by(self, value):
139
+ self._set_style(constant.ConstraintOp2Mode(value),
140
+ sv.CONSTRAINTOP2MODE)
141
+
142
+ @property
143
+ def comparison_operator(self):
144
+ """`RelOp`: The relationship to use to determine blanking.
145
+
146
+ This controls what comparison relation is used for blanking. Possible
147
+ values are `RelOp.LessThanOrEqual`, `RelOp.GreaterThanOrEqual`,
148
+ `RelOp.LessThan`, `RelOp.GreaterThan`, `RelOp.EqualTo` and
149
+ `RelOp.NotEqualTo`::
150
+
151
+ >>> from tecplot.constant import ConstraintOp2Mode, RelOp
152
+ >>> constraint = plot.value_blanking.constraint(0)
153
+ >>> constraint.active = True
154
+ >>> constraint.compare_by = ConstraintOp2Mode.UseConstant
155
+ >>> constraint.comparison_operator = RelOp.LessThanOrEqual
156
+ >>> constraint.comparison_value = 3.14
157
+ """
158
+ return self._get_style(constant.RelOp, sv.RELOP)
159
+
160
+ @comparison_operator.setter
161
+ def comparison_operator(self, value):
162
+ self._set_style(constant.RelOp(value), sv.RELOP)
163
+
164
+ @property
165
+ def active(self):
166
+ """`bool`: Include value blanking.
167
+
168
+ Toggle-on to include this constraint for value blanking on the plot::
169
+
170
+ >>> plot.value_blanking.constraint(0).active = True
171
+ """
172
+ return self._get_style(bool, sv.INCLUDE)
173
+
174
+ @active.setter
175
+ def active(self, value):
176
+ self._set_style(bool(value), sv.INCLUDE)
177
+
178
+
179
+ class ValueBlankingConstraintCartesian2D(ValueBlankingConstraint):
180
+ """Value blanking constraint for cartesian 2D plots.
181
+
182
+ .. seealso:: `ValueBlankingCartesian2D`
183
+ """
184
+ @property
185
+ def show_line(self):
186
+ """`bool`: Show constraint boundary.
187
+
188
+ Toggle-on to display a line that separates the region of your data that
189
+ is blanked from the region which is not blanked::
190
+
191
+ >>> plot.value_blanking.constraint(0).show_line = True
192
+ """
193
+ return self._get_style(bool, sv.SHOW)
194
+
195
+ @show_line.setter
196
+ def show_line(self, value):
197
+ self._set_style(bool(value), sv.SHOW)
198
+
199
+ @property
200
+ def color(self):
201
+ """`Color`: `Color` of the constraint boundary line.
202
+
203
+ Example usage::
204
+
205
+ >>> from tecplot.constant import Color
206
+ >>> plot.value_blanking.constraint(0).show_line = True
207
+ >>> plot.value_blanking.constraint(0).color = Color.Red
208
+ """
209
+ return self._get_style(constant.Color, sv.COLOR)
210
+
211
+ @color.setter
212
+ def color(self, value):
213
+ self._set_style(constant.Color(value), sv.COLOR)
214
+
215
+ @property
216
+ def line_thickness(self):
217
+ """`float`: Width of the constraint boundary line.
218
+
219
+ Example usage::
220
+
221
+ >>> plot.value_blanking.constraint(0).show_line = True
222
+ >>> plot.value_blanking.constraint(0).line_thickness = 1.5
223
+ """
224
+ return self._get_style(float, sv.LINETHICKNESS)
225
+
226
+ @line_thickness.setter
227
+ def line_thickness(self, value):
228
+ self._set_style(float(value), sv.LINETHICKNESS)
229
+
230
+ @property
231
+ def line_pattern(self):
232
+ """`LinePattern`: Dash pattern of the constraint boundary line.
233
+
234
+ Example usage::
235
+
236
+ >>> from tecplot.constant import LinePattern
237
+ >>> constraint = plot.value_blanking.constraint(0)
238
+ >>> constraint.show_line = True
239
+ >>> constraint.line_pattern = LinePattern.Dashed
240
+ """
241
+ return self._get_style(constant.LinePattern, sv.LINEPATTERN)
242
+
243
+ @line_pattern.setter
244
+ def line_pattern(self, value):
245
+ self._set_style(constant.LinePattern(value), sv.LINEPATTERN)
246
+
247
+ @property
248
+ def pattern_length(self):
249
+ """`float`: Length of the dash pattern for the boundary line.
250
+ Example usage::
251
+
252
+ >>> from tecplot.constant import LinePattern
253
+ >>> constraint = plot.value_blanking.constraint(0)
254
+ >>> constraint.show_line = True
255
+ >>> constraint.line_pattern = LinePattern.Dashed
256
+ >>> constraint.pattern_length = 1.5
257
+ """
258
+ return self._get_style(float, sv.PATTERNLENGTH)
259
+
260
+ @pattern_length.setter
261
+ def pattern_length(self, value):
262
+ self._set_style(float(value), sv.PATTERNLENGTH)
263
+
264
+
265
+ class ValueBlanking(session.Style):
266
+ """Value blanking for line plots.
267
+
268
+ .. code-block:: python
269
+ :emphasize-lines: 21-27
270
+
271
+ from os import path
272
+ import tecplot as tp
273
+ from tecplot.constant import *
274
+
275
+ examples_dir = tp.session.tecplot_examples_directory()
276
+ infile = path.join(examples_dir, 'SimpleData', 'Rainfall.dat')
277
+ dataset = tp.data.load_tecplot(infile)
278
+
279
+ frame = tp.active_frame()
280
+ frame.plot_type = PlotType.XYLine
281
+ plot = frame.plot()
282
+
283
+ lmap = plot.linemap(0)
284
+
285
+ line = lmap.line
286
+ line.color = Color.Blue
287
+ line.line_thickness = 1
288
+ line.line_pattern = LinePattern.LongDash
289
+ line.pattern_length = 2
290
+
291
+ plot.value_blanking.active = True
292
+ constraint = plot.value_blanking.constraint(0)
293
+ constraint.active = True
294
+ constraint.compare_by = ConstraintOp2Mode.UseConstant
295
+ constraint.comparison_operator = RelOp.LessThanOrEqual
296
+ constraint.comparison_value = 6
297
+ constraint.variable = dataset.variable('Month')
298
+
299
+ tp.export.save_png('value_blanking_line.png', 600)
300
+
301
+ .. figure:: /_static/images/value_blanking_line.png
302
+ :width: 300px
303
+ :figwidth: 300px
304
+ """
305
+ def __init__(self, plot):
306
+ self.plot = plot
307
+ super().__init__(sv.BLANKING, sv.VALUE, uniqueid=plot.frame.uid)
308
+
309
+ @property
310
+ def active(self):
311
+ """`bool`: Include value blanking.
312
+
313
+ Set to `True` to include value blanking. The individual constraints
314
+ must be activated as well::
315
+
316
+ >>> plot.value_blanking.active = True
317
+ >>> constraint = plot.value_blanking.constraint(0)
318
+ >>> constraint.active = True
319
+ """
320
+ return self._get_style(bool, sv.INCLUDE)
321
+
322
+ @active.setter
323
+ def active(self, value):
324
+ self._set_style(bool(value), sv.INCLUDE)
325
+
326
+ def constraint(self, index):
327
+ """One of the eight availble value-blanking constraints.
328
+
329
+ Parameters:
330
+ index (`Index`): Integer from 0 to 7 inclusive for the eight
331
+ possible value-blanking constraints.
332
+
333
+ Returns:
334
+ `ValueBlankingConstraint`
335
+
336
+ There are total of eight value blanking constraints that can be
337
+ independendly activated and adjusted. Example usage::
338
+
339
+ >>> plot.value_blanking.constraint(4).active = True
340
+ """
341
+ return ValueBlankingConstraint(self, index)
342
+
343
+
344
+ class ValueBlankingCartesian2D(ValueBlanking):
345
+ """Value blanking for cartesian 2D plots.
346
+
347
+ .. code-block:: python
348
+ :emphasize-lines: 14-21
349
+
350
+ from os import path
351
+ import tecplot as tp
352
+ from tecplot.constant import *
353
+
354
+ examples_dir = tp.session.tecplot_examples_directory()
355
+ infile = path.join(examples_dir, 'SimpleData', 'HeatExchanger.plt')
356
+ dataset = tp.data.load_tecplot(infile)
357
+
358
+ frame = tp.active_frame()
359
+ plot = frame.plot(PlotType.Cartesian2D)
360
+
361
+ plot.show_contour = True
362
+
363
+ plot.value_blanking.active = True
364
+ plot.value_blanking.cell_mode = ValueBlankCellMode.AnyCorner
365
+ constraint = plot.value_blanking.constraint(0)
366
+ constraint.active = True
367
+ constraint.compare_by = ConstraintOp2Mode.UseConstant
368
+ constraint.comparison_operator = RelOp.LessThanOrEqual
369
+ constraint.comparison_value = 5
370
+ constraint.variable = dataset.variable('X(M)')
371
+
372
+ # ensure consistent output between interactive (connected) and batch
373
+ plot.contour(0).levels.reset_to_nice()
374
+
375
+ tp.export.save_png('value_blanking_2d.png', 600)
376
+
377
+ .. figure:: /_static/images/value_blanking_2d.png
378
+ :width: 300px
379
+ :figwidth: 300px
380
+ """
381
+ def constraint(self, index):
382
+ """One of the eight availble value-blanking constraints.
383
+
384
+ Parameters:
385
+ index (`Index`): Integer from 0 to 7 inclusive for the eight
386
+ possible value-blanking constraints.
387
+
388
+ Returns:
389
+ `ValueBlankingConstraintCartesian2D`
390
+
391
+ There are total of eight value blanking constraints that can be
392
+ independendly activated and adjusted. Example usage::
393
+
394
+ >>> plot.value_blanking.constraint(4).active = True
395
+ """
396
+ return ValueBlankingConstraintCartesian2D(self, index)
397
+
398
+ @property
399
+ def cell_mode(self):
400
+ """`ValueBlankCellMode`: Determine which cells to blank.
401
+
402
+ This property controls which value is used when determining if a cell
403
+ should be blanked. It also allows for trimming cells precisely.
404
+ Possible values are: `ValueBlankCellMode.AllCorners`,
405
+ `ValueBlankCellMode.AnyCorner`, `ValueBlankCellMode.PrimaryValue` and
406
+ `ValueBlankCellMode.TrimCells`. This affects all value-blanking
407
+ constraints on the plot::
408
+
409
+ >>> from tecplot.constant import ValueBlankCellMode
410
+ >>> plot.value_blanking.cell_mode = ValueBlankCellMode.TrimCells
411
+ """
412
+ if self._get_style(bool, sv.BLANKENTIRECELL):
413
+ return self._get_style(constant.ValueBlankCellMode,
414
+ sv.VALUEBLANKCELLMODE)
415
+ else:
416
+ return constant.ValueBlankCellMode.TrimCells
417
+
418
+ @cell_mode.setter
419
+ def cell_mode(self, value):
420
+ value = constant.ValueBlankCellMode(value)
421
+ if value == constant.ValueBlankCellMode.TrimCells:
422
+ self._set_style(False, sv.BLANKENTIRECELL)
423
+ else:
424
+ self._set_style(True, sv.BLANKENTIRECELL)
425
+ self._set_style(value, sv.VALUEBLANKCELLMODE)
426
+
427
+
428
+ class ValueBlankingCartesian3D(ValueBlanking):
429
+ """Value blanking for cartesian 3D plots.
430
+
431
+ .. code-block:: python
432
+ :emphasize-lines: 12-19
433
+
434
+ from os import path
435
+ import tecplot as tp
436
+ from tecplot.constant import *
437
+
438
+ examples_dir = tp.session.tecplot_examples_directory()
439
+ infile = path.join(examples_dir, 'SimpleData', 'Sphere.lpk')
440
+ tp.load_layout(infile)
441
+
442
+ frame = tp.active_frame()
443
+ plot = frame.plot()
444
+
445
+ plot.value_blanking.active = True
446
+ plot.value_blanking.cell_mode = ValueBlankCellMode.AnyCorner
447
+ constraint = plot.value_blanking.constraint(0)
448
+ constraint.active = True
449
+ constraint.compare_by = ConstraintOp2Mode.UseConstant
450
+ constraint.comparison_operator = RelOp.GreaterThan
451
+ constraint.comparison_value = 0
452
+ constraint.variable = frame.dataset.variable('X')
453
+
454
+ # ensure consistent output between interactive (connected) and batch
455
+ plot.contour(0).levels.reset_to_nice()
456
+
457
+ tp.export.save_png('value_blanking_3d.png', 600)
458
+
459
+ .. figure:: /_static/images/value_blanking_3d.png
460
+ :width: 300px
461
+ :figwidth: 300px
462
+ """
463
+ @property
464
+ def cell_mode(self):
465
+ """`ValueBlankCellMode`: Determine which cells to blank.
466
+
467
+ This property controls which value is used when determining if a cell
468
+ should be blanked. Possible values are:
469
+ `ValueBlankCellMode.AllCorners`, `ValueBlankCellMode.AnyCorner` and
470
+ `ValueBlankCellMode.PrimaryValue`. This affects all value-blanking
471
+ constraints on the plot::
472
+
473
+ >>> from tecplot.constant import ValueBlankCellMode
474
+ >>> plot.value_blanking.cell_mode = ValueBlankCellMode.AnyCorner
475
+ """
476
+ return self._get_style(constant.ValueBlankCellMode,
477
+ sv.VALUEBLANKCELLMODE)
478
+
479
+ @cell_mode.setter
480
+ def cell_mode(self, value):
481
+ value = constant.ValueBlankCellMode(value)
482
+ if value == constant.ValueBlankCellMode.TrimCells:
483
+ msg = 'trim cells mode not available in this plot type'
484
+ raise exception.TecplotLogicError(msg)
485
+ self._set_style(value, sv.VALUEBLANKCELLMODE)
486
+
487
+
488
+ class IJKBlanking(session.Style):
489
+ """IJK blanking for cartesian 2D and 3D plots.
490
+ """
491
+ def __init__(self, plot):
492
+ self.plot = plot
493
+ super().__init__(sv.BLANKING, sv.IJK, uniqueid=plot.frame.uid)
494
+
495
+ @property
496
+ def active(self):
497
+ """`bool`: Include :math:`(i, j, k)` blanking.
498
+
499
+ Set to `True` to include :math:`(i, j, k)` blanking::
500
+
501
+ >>> plot.ijk_blanking.active = True
502
+ """
503
+ return self._get_style(bool, sv.INCLUDE)
504
+
505
+ @active.setter
506
+ def active(self, value):
507
+ self._set_style(bool(value), sv.INCLUDE)
508
+
509
+ @property
510
+ def zone_index(self):
511
+ """`Index`: `Index` of the `Zone <data_access>` to be blanked.
512
+
513
+ Example usage::
514
+
515
+ >>> plot.ijk_blanking.zone_index = 1
516
+ """
517
+ return self._get_style(tecutil.Index, sv.ZONE)
518
+
519
+ @zone_index.setter
520
+ def zone_index(self, value):
521
+ self._set_style(tecutil.Index(value), sv.ZONE)
522
+
523
+ @property
524
+ def zone(self):
525
+ """`Zone <data_access>`: The `Zone <data_access>` to be blanked.
526
+
527
+ Example usage::
528
+
529
+ >>> plot.ijk_blanking.zone = dataset.zone('Zone Name')
530
+ """
531
+ return self.plot.frame.dataset.zone(self.zone_index)
532
+
533
+ @zone.setter
534
+ def zone(self, value):
535
+ self.zone_index = value.index
536
+
537
+ @property
538
+ def mode(self):
539
+ """`IJKBlankMode`: Blank the interior or exterior of the region.
540
+
541
+ Possible values are `IJKBlankMode.BlankInterior` and
542
+ `IJKBlankMode.BlankExterior` and are a reference to the region between
543
+ `IJKBlanking.min_percent` and `IJKBlanking.max_percent`::
544
+
545
+ >>> from tecplot.constant import IJKBlankMode
546
+ >>> plot.ijk_blanking.mode = IJKBlankMode.BlankExterior
547
+ """
548
+ return self._get_style(constant.IJKBlankMode, sv.IJKBLANKMODE)
549
+
550
+ @mode.setter
551
+ def mode(self, value):
552
+ self._set_style(constant.IJKBlankMode(value), sv.IJKBLANKMODE)
553
+
554
+ @property
555
+ def min_percent(self):
556
+ """`tuple`: Minimum :math:`(i, j, k)` values in percent.
557
+
558
+ The percentage is of the total range of the dataset in each dimension.
559
+ This example sets the minimum to 50\% in each of the :math:`(i, j, k)`
560
+ dimensions::
561
+
562
+ >>> plot.ijk_blanking.min_percent = (50, 50, 50)
563
+ """
564
+ return session.IJKMinFract(self)
565
+
566
+ @min_percent.setter
567
+ def min_percent(self, values):
568
+ session.IJKMinFract(self)[:] = values
569
+
570
+ @property
571
+ def max_percent(self):
572
+ """`tuple`: Maximum :math:`(i, j, k)` values in percent.
573
+
574
+ The percentage is of the total range of the dataset in each dimension.
575
+ This example sets the maximum to 90\% in each of the :math:`(i, j, k)`
576
+ dimensions::
577
+
578
+ >>> plot.ijk_blanking.max_percent = (90, 90, 90)
579
+ """
580
+ return session.IJKMaxFract(self)
581
+
582
+ @max_percent.setter
583
+ def max_percent(self, values):
584
+ session.IJKMaxFract(self)[:] = values