Plot Style

Scatter Plots

Scatter

class tecplot.plot.Scatter(plot)[source]

Plot-local scatter style settings.

This class controls the style of drawn scatter points on a specific plot.

Attributes

variable The Variable to be used when sizing scatter symbols.
variable_index Zero-based index of the Variable used for size of scatter symbols.
Scatter.variable

The Variable to be used when sizing scatter symbols.

The variable must belong to the Dataset attached to the Frame that holds this ContourGroup. Example usage:

>>> plot.scatter.variable = dataset.variable('P')
>>> plot.fieldmap(0).scatter.size_by_variable = True
Scatter.variable_index

Zero-based index of the Variable used for size of scatter symbols.

>>> plot.scatter.variable_index = dataset.variable('P').index
>>> plot.fieldmap(0).scatter.size_by_variable = True

The Dataset attached to this contour group’s Frame is used, and the variable itself can be obtained through it:

>>> scatter = plot.scatter
>>> scatter_var = dataset.variable(scatter.variable_index)
>>> scatter_var.index == scatter.variable_index
True

Vector Plots

Vector2D

class tecplot.plot.Vector2D(plot)[source]

Attributes

u_variable
u_variable_index
v_variable
v_variable_index
Vector2D.u_variable
Vector2D.u_variable_index
Vector2D.v_variable
Vector2D.v_variable_index

Vector3D

class tecplot.plot.Vector3D(plot)[source]

Attributes

u_variable
u_variable_index
v_variable
v_variable_index
w_variable
w_variable_index
Vector3D.u_variable
Vector3D.u_variable_index
Vector3D.v_variable
Vector3D.v_variable_index
Vector3D.w_variable
Vector3D.w_variable_index

Contours

ContourGroup

class tecplot.plot.ContourGroup(index, plot)[source]

Contouring of a variable using a colormap.

This object controls the style for a specific contour group within a Frame. Contour levels, colormap and contour lines are accessed through this class.

from os import path
import tecplot as tp
from tecplot.constant import *

# load data
exdir = tp.session.tecplot_examples_directory()
datafile = path.join(exdir,'2D','polarplot.plt')
dataset = tp.data.load_tecplot(datafile)
plot = dataset.frame.plot()
plot.show_contour = True

contour = plot.contour(0)
contour.variable = dataset.variable('Mix')
contour.colormap_name = 'Magma'

# save image to file
tp.export.save_png('polarplot_magma.png', 600)
../_images/polarplot_magma.png

There are a fixed number of contour groups available for each plot. Others can be enabled and modified by specifying an index other than zero:

>>> contour3 = plot.contour(3)
>>> contour3.variable = dataset.variable('U')

Attributes

color_cutoff ContourColorCutoff object controlling color cutoff min/max.
colormap_filter ContourColormapFilter object controlling colormap style properties.
colormap_name The name of the colormap (str) to be used.
default_num_levels Default target number (int) of levels used when resetting.
labels ContourLabels object controlling contour line labels.
legend ContourLegend associated with this ContourGroup.
levels ContourLevels holding the list of contour levels.
lines ContourLines object controlling contour line style.
variable The Variable being contoured.
variable_index Zero-based index of the Variable being contoured.
ContourGroup.color_cutoff

ContourColorCutoff object controlling color cutoff min/max.

Type:ContourColorCutoff
>>> cutoff = plot.contour(0).color_cutoff
>>> cutoff.min = 3.14
ContourGroup.colormap_filter

ContourColormapFilter object controlling colormap style properties.

Type:ContourColormapFilter
>>> plot.contour(0).colormap_filter.reverse = True
ContourGroup.colormap_name

The name of the colormap (str) to be used.

Type:string

Example:

>>> plot.contour(0).colormap_name = 'Sequential - Yellow/Green/Blue'
ContourGroup.default_num_levels

Default target number (int) of levels used when resetting.

Type:integer

Example:

>>> plot.contour(0).default_num_levels = 20
ContourGroup.labels

ContourLabels object controlling contour line labels.

Type:ContourLabels

Lines must be turned on through the associated fieldmap object for style changes to be meaningful:

>>> plot.fieldmap(0).contour.contour_type = ContourType.Lines
>>> plot.contour(0).labels.show = True
ContourGroup.legend

ContourLegend associated with this ContourGroup.

Type:ContourLegend

This object controls the values of the contour lines. Values can be added, deleted or overridden completely:

>>> plot.contour(0).levels.reset_to_nice(15)
ContourGroup.levels

ContourLevels holding the list of contour levels.

Type:ContourLevels

This object controls the values of the contour lines. Values can be added, deleted or overridden completely:

>>> plot.contour(0).levels.reset_to_nice(15)
ContourGroup.lines

ContourLines object controlling contour line style.

Type:ContourLines

Lines must be turned on through the associated fieldmap object for style changes to be meaningful:

>>> plot.fieldmap(0).contour.contour_type = ContourType.Lines
>>> plot.contour(0).lines.mode = ContourLineMode.DashNegative
ContourGroup.variable

The Variable being contoured.

The variable must belong to the Dataset attached to the Frame that holds this ContourGroup. Example usage:

>>> plot.contour(0).variable = dataset.variable('P')
ContourGroup.variable_index

Zero-based index of the Variable being contoured.

>>> plot.contour(0).variable_index = dataset.variable('P').index

The Dataset attached to this contour group’s Frame is used:

>>> contour = plot.contour(0)
>>> contour_var = frame.dataset.variable(contour.variable_index)
>>> contour_var.index == contour.variable_index
True

ContourColorCutoff

class tecplot.plot.ContourColorCutoff(contour)[source]

Color-mapped value limits to display.

This lets you specify a range within which contour flooding and multi-colored objects, such as scatter symbols, are displayed.

import os
import tecplot as tp
from tecplot.constant import PlotType, SurfacesToPlot

# load the data
examples_dir = tp.session.tecplot_examples_directory()
datafile = os.path.join(examples_dir,'3D','pyramid.plt')
dataset = tp.data.load_tecplot(datafile)

# show boundary faces and contours
plot = tp.active_frame().plot()
surfaces = plot.fieldmap(0).surfaces
surfaces.surfaces_to_plot = SurfacesToPlot.BoundaryFaces
plot.show_contour = True

# cutoff contour flooding outside min/max range
cutoff = plot.contour(0).color_cutoff
cutoff.include_min = True
cutoff.min = 0.5
cutoff.include_max = True
cutoff.max = 1.0
cutoff.inverted = True

tp.export.save_png('contour_color_cutoff.png',600)
../_images/contour_color_cutoff.png

Attributes

include_max Use the maximum cutoff value.
include_min Use the minimum cutoff value.
inverted Cuts values outside the range instead of inside.
max The maximum cutoff value.
min The minimum cutoff value.
ContourColorCutoff.include_max

Use the maximum cutoff value.

Type:boolean

Thie example turns off the maximum cutoff:

>>> plot.contour(0).color_cutoff.include_max = False
ContourColorCutoff.include_min

Use the minimum cutoff value.

Type:boolean

Example usage:

>>> plot.contour(0).color_cutoff.include_min = True
>>> plot.contour(0).color_cutoff.min = 3.14
ContourColorCutoff.inverted

Cuts values outside the range instead of inside.

Type:bool
>>> plot.contour(0).color_cutoff.inverted = True
ContourColorCutoff.max

The maximum cutoff value.

Type:float or None

The include_max must be set to True:

>>> plot.contour(0).color_cutoff.include_max = True
>>> plot.contour(0).color_cutoff.max = None
ContourColorCutoff.min

The minimum cutoff value.

Type:float or None

The include_min must be set to True:

>>> plot.contour(0).color_cutoff.include_min = True
>>> plot.contour(0).color_cutoff.min = 3.14

ContourColormapFilter

class tecplot.plot.ContourColormapFilter(contour)[source]

Controls how the colormap is rendered for a given contour.

from os import path
import tecplot as tp
from tecplot.constant import *

# load the data
exdir = tp.session.tecplot_examples_directory()
datafile = path.join(exdir,'2D','MultiPoly2D.plt')
ds = tp.data.load_tecplot(datafile)

# set plot type to 2D field plot
frame = tp.active_frame()
frame.plot_type = PlotType.Cartesian2D
plot = frame.plot()

# show boundary faces and contours
surfaces = plot.fieldmap(0).surfaces
surfaces.surfaces_to_plot = SurfacesToPlot.BoundaryFaces
plot.show_contour = True

# by default, contour 0 is the one that's shown,
# set the contour's variable, colormap and number of levels
contour = plot.contour(0)
contour.variable = ds.variable('P')

# cycle through the colormap three times and reversed
# show a faithful (non-approximate) continuous distribution
contour_filter = contour.colormap_filter
contour_filter.num_cycles = 3
contour_filter.reversed = True
contour_filter.fast_continuous_flood = False
contour_filter.distribution = ColorMapDistribution.Continuous

# save image to file
tp.export.save_png('poly2d_filtered.png', 600)
../_images/poly2d_filtered.png

Attributes

distribution Rendering style of the colormap.
fast_continuous_flood Use a fast approximation to continuously flood the colormap.
num_cycles Number of cycles to repeat the colormap.
reversed Reverse the colormap.
show_overrides Enable the colormap overrides in this contour group.
zebra_shade Returns a ContourColormapZebraShade filtering object.

Methods

override(index) Returns a ContourColormapOverride object by index.
ContourColormapFilter.distribution

Rendering style of the colormap.

Type:ColorMapDistribution

Possible values:

Banded
A solid color is assigned for all values within the band between two levels.
Continuous
The color distribution assigns linearly varying colors to all multi-colored objects or contour flooded regions.

Example:

>>> from tecplot.constant import ColorMapDistribution
>>> cmap_filter = plot.contour(0).colormap_filter
>>> cmap_filter.distribution = ColorMapDistribution.Banded
ContourColormapFilter.fast_continuous_flood

Use a fast approximation to continuously flood the colormap.

Type:bool

Causes each cell to be flooded using interpolation between the color values at each node. When the transition from a color at one node to another node crosses over the boundary between control points in the color spectrum, fast flooding may produce colors not in the spectrum. Setting this to False is slower, but more accurate:

>>> cmap_filter = plot.contour(0).colormap_filter
>>> cmap_filter.fast_continuous_flood = True
ContourColormapFilter.num_cycles

Number of cycles to repeat the colormap.

Type:integer
>>> plot.contour(0).colormap_filter.num_cycles = 3
ContourColormapFilter.override(index)[source]

Returns a ContourColormapOverride object by index.

Parameters:index (int) – The index of the colormap override object.
Returns:ContourColormapOverride – The class controlling the specific contour colormap override requested by index.

Example:

>>> cmap_override = plot.contour(0).colormap_filter.override(0)
>>> cmap_override.show = True
ContourColormapFilter.reversed

Reverse the colormap.

Type:bool
>>> plot.contour(0).colormap_filter.reversed = True
ContourColormapFilter.show_overrides

Enable the colormap overrides in this contour group.

Type:boolean

The overrides themselves must be turned on as well for this to have an effect on the resulting plot:

>>> contour = plot.contour(0)
>>> cmap_filter = contour.colormap_filter
>>> cmap_filter.show_overrides = True
>>> cmap_filter.override(0).show = True
ContourColormapFilter.zebra_shade

Returns a ContourColormapZebraShade filtering object.

Type:ContourColormapZebraShade

Example usage:

>>> zebra = plot.contour(0).colormap_filter.zebra_shade
>>> zebra.show = True

ContourColormapOverride

class tecplot.plot.ContourColormapOverride(index, colormap_filter)[source]

Assigns contour bands to specific color.

Specific contour bands can be assigned a unique basic color. This is useful for forcing a particular region to use blue, for example, to designate an area of water. You can define up to 16 color overrides.

from os import path
import tecplot as tp
from tecplot.constant import *

# load the data
exdir = tp.session.tecplot_examples_directory()
datafile = path.join(exdir,'2D','cstream.plt')
ds = tp.data.load_tecplot(datafile)

# set plot type to 2D field plot
frame = tp.active_frame()
frame.plot_type = PlotType.Cartesian2D
plot = frame.plot()

# show boundary faces and contours
surfaces = plot.fieldmap(0).surfaces
surfaces.surfaces_to_plot = SurfacesToPlot.BoundaryFaces
plot.show_contour = True

# by default, contour 0 is the one that's shown,
# set the contour's variable, colormap and number of levels
contour = plot.contour(0)
contour.variable = ds.variable('v3')
contour.colormap_name = 'Sequential - Yellow/Green/Blue'
contour.levels.reset(10)

# turn on colormap overrides for this contour
contour_filter = contour.colormap_filter
contour_filter.show_overrides = True

# turn on override 0, coloring the first 4 levels red
contour_override = contour_filter.override(0)
contour_override.show = True
contour_override.color = Color.Red
contour_override.start_level = 0
contour_override.end_level = 4

# save image to file
tp.export.save_png('cstream_contours.png', 600)
../_images/cstream_contours.png

Attributes

color Color which will override the colormap.
end_level Last level to override.
show Include this colormap override when filter is shown.
start_level First level to override.
ContourColormapOverride.color

Color which will override the colormap.

Type:Color

Example usage:

>>> from tecplot.constant import Color
>>> colormap_filter = plot.contour(0).colormap_filter
>>> cmap_override = colormap_filter.override(0)
>>> cmap_override.color = Color.Blue
ContourColormapOverride.end_level

Last level to override.

Type:integer

Example usage:

>>> colormap_filter = plot.contour(0).colormap_filter
>>> cmap_override = colormap_filter.override(0)
>>> cmap_override.end_level = 2
ContourColormapOverride.show

Include this colormap override when filter is shown.

Type:boolean

Example usage:

>>> colormap_filter = plot.contour(0).colormap_filter
>>> cmap_override = colormap_filter.override(0)
>>> cmap_override.show = True
ContourColormapOverride.start_level

First level to override.

Type:integer

Example usage:

>>> colormap_filter = plot.contour(0).colormap_filter
>>> cmap_override = colormap_filter.override(0)
>>> cmap_override.start_level = 2

ContourColormapZebraShade

class tecplot.plot.ContourColormapZebraShade(colormap_filter)[source]

This filter sets a uniform color for every other band.

Setting the color to None turns the bands off and makes them transparent:

from os import path
import numpy as np
import tecplot as tp
from tecplot.constant import Color, SurfacesToPlot

# load the data
examples_dir = tp.session.tecplot_examples_directory()
datafile = path.join(examples_dir,'3D','pyramid.plt')
dataset = tp.data.load_tecplot(datafile)

# show boundary faces and contours
plot = tp.active_frame().plot()
surfaces = plot.fieldmap(0).surfaces
surfaces.surfaces_to_plot = SurfacesToPlot.BoundaryFaces
plot.show_contour = True
plot.show_shade = False

# set zebra filter on and make the zebra contours transparent
cont0 = plot.contour(0)
zebra = cont0.colormap_filter.zebra_shade
zebra.show = True
zebra.transparent = True

tp.export.save_png('contour_zebra.png', 600)
../_images/contour_zebra.png

Attributes

color Color of the zebra shading.
show Show zebra shading in this ContourGroup.
transparent Set the the zebra bands to be transparent.
ContourColormapZebraShade.color

Color of the zebra shading.

Type:Color

Example usage:

>>> from tecplot.constant import Color
>>> filter = plot.contour(0).colormap_filter
>>> zebra = filter.zebra_shade
>>> zebra.show = True
>>> zebra.color = Color.Blue
ContourColormapZebraShade.show

Show zebra shading in this ContourGroup.

Type:boolean

Example usage:

>>> cmap_filter = plot.contour(0).colormap_filter
>>> cmap_filter.zebra_shade.show = True
ContourColormapZebraShade.transparent

Set the the zebra bands to be transparent.

Type:boolean

Example usage:

>>> filter = plot.contour(0).colormap_filter
>>> zebra = filter.zebra_shade
>>> zebra.show = True
>>> zebra.transparent = True

ContourLabels

class tecplot.plot.ContourLabels(contour)[source]

Contour line label style, position and alignment control.

These are labels that identify particular contour levels either by value or optionally, by number starting from one. The plot type must be lines or lines and flood in order to see them:

from os import path
import tecplot as tp
from tecplot.constant import Color, ContourType, SurfacesToPlot

# load the data
examples_dir = tp.session.tecplot_examples_directory()
datafile = path.join(examples_dir,'3D','pyramid.plt')
dataset = tp.data.load_tecplot(datafile)

# show boundary faces and contours
plot = tp.active_frame().plot()
plot.fieldmap(0).contour.contour_type = ContourType.Lines
surfaces = plot.fieldmap(0).surfaces
surfaces.surfaces_to_plot = SurfacesToPlot.BoundaryFaces
plot.show_contour = True

# set contour label style
contour_labels = plot.contour(0).labels
contour_labels.show = True
contour_labels.auto_align = False
contour_labels.color = Color.Blue
contour_labels.background_color = Color.White
contour_labels.margin = 20

tp.export.save_png('contour_labels.png', 600)
../_images/contour_labels.png

Attributes

auto_align Automatically align the labels with the contour lines.
auto_generate Automatically generate labels along contour lines.
background_color Background fill color behind the text labels.
color Text color of the labels.
filled Fill the background area behind the text labels.
font Font used to show the labels.
label_by_level Use the contour numbers as the label instead of the data value.
margin Spacing around the text and the filled background area.
show Show the contour line labels.
spacing Spacing between labels along the contour lines.
step Number of contour lines from one label to the next.
ContourLabels.auto_align

Automatically align the labels with the contour lines.

Type:bool

This causes the flow of the text to be aligned with the contour lines. Otherwise, the labels are aligned with the frame:

>>> from tecplot.constant import ContourType
>>> plot.fieldmap(0).contour.contour_type = ContourType.Lines
>>> plot.contour(0).labels.show = True
>>> plot.contour(0).labels.auto_align = False
ContourLabels.auto_generate

Automatically generate labels along contour lines.

Type:bool

This causes a new set of contour labels to be created at each redraw:

>>> from tecplot.constant import Color, ContourType
>>> plot.fieldmap(0).contour.contour_type = ContourType.Lines
>>> plot.contour(0).labels.show = True
>>> plot.contour(0).labels.auto_generate = True
ContourLabels.background_color

Background fill color behind the text labels.

Type:Color

The filled attribute must be set to True:

>>> from tecplot.constant import Color, ContourType
>>> plot.fieldmap(0).contour.contour_type = ContourType.Lines
>>> plot.contour(0).labels.show = True
>>> plot.contour(0).labels.background_color = Color.Blue
ContourLabels.color

Text color of the labels.

Type:Color

Example:

>>> from tecplot.constant import Color, ContourType
>>> plot.fieldmap(0).contour.contour_type = ContourType.Lines
>>> plot.contour(0).labels.show = True
>>> plot.contour(0).labels.color Color.Blue
ContourLabels.filled

Fill the background area behind the text labels.

Type:boolean

The background can be filled with a color or disabled (made transparent) by setting this property to False:

>>> from tecplot.constant import Color, ContourType
>>> plot.fieldmap(0).contour.contour_type = ContourType.Lines
>>> plot.contour(0).labels.show = True
>>> plot.contour(0).labels.filled = True
>>> plot.contour(0).labels.background_color = Color.Blue
>>> plot.contour(1).labels.show = True
>>> plot.contour(1).labels.filled = False
ContourLabels.font

Font used to show the labels.

Type:Font

Example:

>>> from tecplot.constant import Color, ContourType
>>> plot.fieldmap(0).contour.contour_type = ContourType.Lines
>>> plot.contour(0).labels.show = True
>>> plot.contour(0).labels.font.size = 3.5
ContourLabels.label_by_level

Use the contour numbers as the label instead of the data value.

Type:bool

Contour level numbers start from one when drawn. Example usage:

>>> from tecplot.constant import Color, ContourType
>>> plot.fieldmap(0).contour.contour_type = ContourType.Lines
>>> plot.contour(0).labels.show = True
>>> plot.contour(0).labels.label_by_level = True
ContourLabels.margin

Spacing around the text and the filled background area.

Type:float in percentage of the text height.

Contour numbers start from one when drawn. Example usage:

>>> from tecplot.constant import Color, ContourType
>>> plot.fieldmap(0).contour.contour_type = ContourType.Lines
>>> plot.contour(0).labels.show = True
>>> plot.contour(0).labels.background_color = Color.Yellow
>>> plot.contour(0).labels.margin = 20
ContourLabels.show

Show the contour line labels.

Type:bool

Contour lines must be on for this to have any effect:

>>> from tecplot.constant import ContourType
>>> plot.fieldmap(0).contour.contour_type = ContourType.Lines
>>> plot.contour(0).labels.show = True
ContourLabels.spacing

Spacing between labels along the contour lines.

Type:float

This is the distance between each label along each contour line in percentage of the frame height:

>>> from tecplot.constant import ContourType
>>> plot.fieldmap(0).contour.contour_type = ContourType.Lines
>>> plot.contour(0).labels.show = True
>>> plot.contour(0).labels.spacing = 20
ContourLabels.step

Number of contour lines from one label to the next.

Type:int

This is the number of contour bands between lines that are to be labeled:

>>> from tecplot.constant import ContourType
>>> plot.fieldmap(0).contour.contour_type = ContourType.Lines
>>> plot.contour(0).labels.show = True
>>> plot.contour(0).labels.step = 4

ContourLevels

class tecplot.plot.ContourLevels(contour)[source]

List of contour level values.

A contour level is a value at which contour lines are drawn, or for banded contour flooding, the border between different colors of flooding. Initially, each contour group consists of approximately 10 levels evenly spaced over the z coordinate in the Frame‘s Dataset. These values can be manipulated with the ContourLevels object obtained via the ContourGroup.levels attribute.

from os import path
import numpy as np
import tecplot as tp

# load layout
examples_dir = tp.session.tecplot_examples_directory()
example_layout = path.join(examples_dir,'2D','3element.lpk')
tp.load_layout(example_layout)
frame = tp.active_frame()

levels = frame.plot().contour(0).levels
levels.reset_levels(np.linspace(55000,115000,61))

# save image to file
tp.export.save_png('3element_adjusted_levels.png', 600)
../_images/3element_adjusted_levels.png

Note

The streamtraces in the plot above is a side-effect of settings in layout file used. For more information about streamtraces, see the plot.Streamtrace class reference.

Methods

add(*values) Adds new levels to the existing list.
delete_nearest(value) Removes the level closest to the specified value.
delete_range(min_value, max_value) Inclusively, deletes all levels within a specified range.
reset([num_levels]) Resets the levels to the number specified.
reset_levels(*values) Resets the levels to the values specified.
reset_to_nice([num_levels]) Approximately resets the levels to the number specified.
ContourLevels.add(*values)[source]

Adds new levels to the existing list.

Parameters:*values (floats) – The level values to be added to the ContourGroup.

The values added are inserted into the list of levels in ascending order:

>>> levels = plot.contour(0).levels
>>> list(levels)
[0.0, 1.0, 2.0, 3.0, 4.0, 5.0]
>>> levels.add(3.14159)
>>> list(levels)
[0.0, 1.0, 2.0, 3.0, 3.14159, 4.0, 5.0]
ContourLevels.delete_nearest(value)[source]

Removes the level closest to the specified value.

Parameters:value (float) – Value of the level to remove.

This method deletes the contour level with the value nearest the supplied value:

>>> plot.contour(0).levels.delete_nearest(3.14)
ContourLevels.delete_range(min_value, max_value)[source]

Inclusively, deletes all levels within a specified range.

Parameters:
  • min_value (float) – Minimum value to remove.
  • max_value (float) – Maximum value to remove.

This method deletes all contour levels between the specified minimum and maximum values of the contour variable (inclusive):

>>> plot.contour(0).levels.delete_range(0.5, 1.5)
ContourLevels.reset(num_levels=15)[source]

Resets the levels to the number specified.

Parameters:num_levels (integer) – Number of levels. (default: 10)

This will reset the contour levels to a set of evenly distributed values spanning the entire range of the currently selected contouring variable:

>>> plot.contour(0).levels.reset(30)
ContourLevels.reset_levels(*values)[source]

Resets the levels to the values specified.

Parameters:*values (floats) – The level values to be added to the ContourGroup.

This method replaces the current set of contour levels with a new set. Here, we set the levels to go from 0 to 100 in steps of 5:

>>> plot.contour(0).levels.reset_levels(*range(0,101,5))
ContourLevels.reset_to_nice(num_levels=15)[source]

Approximately resets the levels to the number specified.

Parameters:num_levels (integer) – Approximate number of levels to create. (default: 10)

This will reset the contour levels to a set of evenly distributed values that approximately spans the range of the currently selected contouring variable. Exact range and number of levels will be adjusted to make the contour levels have “nice” values:

>>> plot.contour(0).levels.reset_to_nice(50)

ContourLines

class tecplot.plot.ContourLines(contour)[source]

Contour line style.

This object sets the style of the contour lines once turned on.

from os import path
import tecplot as tp
from tecplot.constant import (ContourLineMode, ContourType,
                              SurfacesToPlot)

# load the data
examples_dir = tp.session.tecplot_examples_directory()
datafile = path.join(examples_dir,'3D','pyramid.plt')
dataset = tp.data.load_tecplot(datafile)

# show boundary faces and contours
plot = tp.active_frame().plot()
plot.fieldmap(0).contour.contour_type = ContourType.Lines
surfaces = plot.fieldmap(0).surfaces
surfaces.surfaces_to_plot = SurfacesToPlot.BoundaryFaces
plot.show_contour = True

# set contour line style
contour_lines = plot.contour(0).lines
contour_lines.mode = ContourLineMode.SkipToSolid
contour_lines.step = 4
contour_lines.pattern_length = 2

tp.export.save_png('contour_lines.png', 600)
../_images/contour_lines.png

Attributes

mode Type of lines to draw on the plot (ContourLineMode).
pattern_length Length of dashed lines and space between dashes (float).
step Number of lines to step for SkipToSolid line mode (int).
ContourLines.mode

Type of lines to draw on the plot (ContourLineMode).

Type:ContourLineMode

Possible values:

UseZoneLineType
For each zone, draw the contour lines using the line pattern and pattern length specified in the FieldmapContour for the parent Fieldmaps. If you are adding contour lines to polyhedral zones, the patterns will not be continuous from one cell to the next and the pattern will restart at every cell boundary.
SkipToSolid
Draw dashed lines between each pair of solid lines which are spaced out by the ContourLines.step property. This will override any line pattern or thickness setting in the parent Fieldmaps‘s FieldmapContour object.
DashNegative
Draw lines of positive contour variable value as solid lines and lines of negative contour variable value as dashed lines. This will override any line pattern or thickness setting in the parent Fieldmaps‘s FieldmapContour object.

Example:

>>> from tecplot.constant import ContourLineMode
>>> lines = plot.contour(0).lines
>>> lines.mode = ContourLineMode.DashNegative
ContourLines.pattern_length

Length of dashed lines and space between dashes (float).

Type:float

The length is in percentage of the frame height:

>>> from tecplot.constant import ContourLineMode
>>> lines = plot.contour(0).lines
>>> lines.mode = ContourLineMode.SkipToSolid
>>> lines.step = 5
>>> lines.pattern_length = 5
ContourLines.step

Number of lines to step for SkipToSolid line mode (int).

Type:int

Example:

>>> from tecplot.constant import ContourLineMode
>>> lines = plot.contour(0).lines
>>> lines.mode = ContourLineMode.SkipToSolid
>>> lines.step = 5

Isosurface

IsosurfaceGroup

class tecplot.plot.IsosurfaceGroup(index, plot)[source]

Isosurfaces style control.

from os import path
import tecplot as tp
from tecplot.plot.isosurface import IsosurfaceGroup
from tecplot.constant import LightingEffect, Color, IsoSurfaceSelection

examples_dir = tp.session.tecplot_examples_directory()
datafile = path.join(examples_dir, '3D_Volume', 'ductflow.plt')
dataset = tp.data.load_tecplot(datafile)

plot = tp.active_frame().plot()
plot.show_isosurfaces = True
plot.contour(0).variable = dataset.variable('U(M/S)')

iso = plot.isosurface(0)  # type: IsosurfaceGroup

iso.isosurface_selection = IsoSurfaceSelection.ThreeSpecificValues
iso.isosurface_values = (135.674706817, 264.930212259, 394.185717702)

iso.shade.use_lighting_effect = True
iso.effects.lighting_effect = LightingEffect.Paneled
iso.contour.show = True

iso.mesh.show = True
iso.mesh.line_thickness = .1
iso.mesh.color = Color.Black
iso.effects.use_translucency = True
iso.effects.surface_translucency = 50

tp.export.save_png('isosurface_group.png', 600)
../_images/isosurface_group.png

Attributes

contour Contour attributes for this isosurface group.
definition_contour_group Contour group from which isosurfaces are based.
definition_contour_group_index Contour group index from which isosurfaces are based.
effects Settings for isosurface effects.
isosurface_selection Select where to draw isosurfaces.
isosurface_values Query/Assign up to 3 values at which to draw isosurfaces.
marching_cubes_algorithm Marching cubes algorithm.
mesh Mesh attributes for this isosurface group.
obey_source_zone_blanking Obey source zone blanking.
shade Shade attributes for this isosurface group.
show Show isosurfaces for this isosurface group.
IsosurfaceGroup.contour

Contour attributes for this isosurface group.

Type:IsosurfaceContour

Example usage:

>>> plot.isosurface(0).show = True
>>> plot.isosurface(0).contour.show = True
IsosurfaceGroup.definition_contour_group

Contour group from which isosurfaces are based.

Type:ContourGroup

Example usage:

>>> group = plot.contour(1)
>>> plot.isosurface(0).definition_contour_group = group
IsosurfaceGroup.definition_contour_group_index

Contour group index from which isosurfaces are based.

Type:Index

Contour group settings can be changed from plot.ContourGroup.

Example usage:

>>> plot.isosurface(0).show = True
>>> plot.isosurface(0).definition_contour_group_index = 1
IsosurfaceGroup.effects

Settings for isosurface effects.

Type:IsosurfaceEffects

Example usage:

>>> plot.isosurface(0).show = True
>>> plot.isosurface(0).effects.use_translucency = True
IsosurfaceGroup.isosurface_selection

Select where to draw isosurfaces.

Type:IsoSurfaceSelection
Iso-surfaces may be drawn at:
  • Contour group levels
  • At specified value(s) - Specify up to three values of the contour variable at which to draw isosurfaces.
To draw isosurfaces at contour group lines:
  1. Set isosurface_selection to IsoSurfaceSelection.AllContourLevels.
  2. Optional: Change tecplot.plot.ContourLevels
To draw isosurfaces at up to 3 values:
  1. Set isosurface_selection to one of the following: IsoSurfaceSelection.OneSpecificValue IsoSurfaceSelection.TwoSpecificValues IsoSurfaceSelection.ThreeSpecificValues
  2. Set isosurface_values to a 1, 2, or 3 tuple of floats

See also isosurface_values.

Example usage:

>>> plot.isosurface(0).show = True
>>> plot.isosurface(0).isosurface_selection = IsoSurfaceSelection.TwoSpecificValues
>>> plot.isosurface(0).isosurface_values = (.3, .8)
IsosurfaceGroup.isosurface_values

Query/Assign up to 3 values at which to draw isosurfaces.

Type:1, 2, or 3-tuple of floats, or scalar float
To draw isosurfaces at up to 3 values:
  1. Set isosurface_selection to one of the following: IsoSurfaceSelection.OneSpecificValue IsoSurfaceSelection.TwoSpecificValues IsoSurfaceSelection.ThreeSpecificValues
  2. Set isosurface_values to a 1, 2, or 3 tuple or list of floats, or set to a scalar float to assign the first value only.

When queried, this property will always return a 3 tuple of floats.

See also isosurface_selection.

Assign first isosurface value using a scalar float:

>>> plot.isosurface(0).isosurface_selection = IsoSurfaceSelection.OneSpecificValue
>>> plot.isosurface(0).isosurface_values = 0.5
>>> plot.isosurface(0).isosurface_values[0]
>>> 0.5

Assign first isosurface value using a 1-tuple:

>>> plot.isosurface(0).isosurface_selection = IsoSurfaceSelection.OneSpecificValue
>>> plot.isosurface(0).isosurface_values = (.5,) # 1-tuple
>>> plot.isosurface(0).isosurface_values
>>> 0.5

Assign all three isosurface values:

>>> plot.isosurface(0).isosurface_selection = IsoSurfaceSelection.ThreeSpecificValues
>>> plot.isosurface(0).isosurface_values = (.5, .7, 9)

Assign the third isosurface values after assigning the first two:

>>> plot.isosurface(0).isosurface_selection = IsoSurfaceSelection.ThreeSpecificValues
>>> # Assign first and second isosurface value using a tuple
>>> plot.isosurface(0).isosurface_values = (0.0, 0.1)
>>> # Assign third isosurface value
>>> plot.isosurface(0).isosurface_values[2] = .3
>>> plot.isosurface(0).isosurface_values[2]
>>> .3
>>> plot.isosurface(0).isosurface_values
>>> (0.0, 0.1, .3)

Query the three isosurface values:

>>> # isosurface_values always returns a
>>> # list-like object of 3 floats with of current
>>> # isosurface values, even if fewer than three have been set.
>>> values = plot.isosurface(0).isosurface_values
>>> values
>>> (0.1, 0.2, 0.3)
>>> values[0]
>>> 0.1
>>> values[1]
>>> 0.2
>>> values[2]
>>> 0.3
>>> len(plot.isosurface(0).isosurface_values)
>>> 3
IsosurfaceGroup.marching_cubes_algorithm

Marching cubes algorithm.

Select a marching cube algorithm:

  • MarchingCubeAlgorithm.Classic - This uses the original marching

    cubes algorithm, which only considered 15 different ways to slice a cube.

  • MarchingCubeAlgorithm.ClassicPlus - This enhances the classic

    algorithm by filling in portions of a cell when we have saddle points. This eliminates holes in the isosurface but does not work with szl-backed data.

  • MarchingCubeAlgorithm.MC33 - This uses an enhanced algorithm

    which considers over 255 separate use cases for how cubes can be sliced. This is more accurate, eliminates holes in the isosurfaces and works with szl backed data.

MarchingCubeAlgorithm.MC33 is recommended, and is the default.

Example usage:

>>> plot.isosurface(0).show = True
>>> plot.isosurface(0).marching_cubes_algorithm = MarchingCubeAlgorithm.MC33
IsosurfaceGroup.mesh

Mesh attributes for this isosurface group.

Type:IsosurfaceMesh

Example usage:

>>> plot.isosurface(0).show = True
>>> plot.isosurface(0).mesh.show = True
IsosurfaceGroup.obey_source_zone_blanking

Obey source zone blanking.

Type:

boolean

  • When True, isosurfaces are generated for non-blanked regions only.
  • When False, isosurfaces are generated for blanked and unblanked. regions.

Example usage:

>>> plot.isosurface(0).show = True
>>> plot.isosurface(0).obey_source_zone_blanking = True
IsosurfaceGroup.shade

Shade attributes for this isosurface group.

Type:IsosurfaceShade

Example usage:

>>> plot.isosurface(0).shade.show = True
IsosurfaceGroup.show

Show isosurfaces for this isosurface group.

Type:bool

Example usage:

>>> plot.isosurface(1).show = True

IsosurfaceContour

class tecplot.plot.IsosurfaceContour(contour)[source]

Contour attributes of the isosurface group.

import tecplot as tp
from os import path
from tecplot.plot import IsosurfaceGroup
from tecplot.constant import ContourType

examples_dir = tp.session.tecplot_examples_directory()
datafile = path.join(examples_dir, '3D_Volume', 'ductflow.plt')
dataset = tp.data.load_tecplot(datafile)

plot = tp.active_frame().plot()
plot.show_isosurfaces = True
plot.contour(0).variable = dataset.variable('U(M/S)')

iso = plot.isosurface(0)
iso.contour.use_lighting_effect = True

iso.contour.show = True
iso.contour.contour_type = ContourType.AverageCell
iso.contour.flood_contour_group_index = 5  # T(K)

tp.export.save_png('isosurface_contour.png', 600)
../_images/isosurface_contour.png

Attributes

contour_type Contour display type.
flood_contour_group Contour group to use for flooding.
flood_contour_group_index The Index of the ContourGroup to use for flooding.
line_color Color of contour lines.
line_contour_group The contour group to use for contour lines.
line_contour_group_index The Index of the ContourGroup to use for contour lines.
line_thickness Contour line thickness as a percentage of frame width.
show Show contours on isosurfaces.
use_lighting_effect Enable lighting effect.
IsosurfaceContour.contour_type

Contour display type.

Type:ContourType
  • ContourType.Lines - Draws lines of constant value of the specified contour variable.
  • ContourType.Flood - Floods regions between contour lines with colors from a color map. The distribution of colors used for contour flooding may be banded or continuous. When banded distribution is used for flooding, a solid color is used between contour levels. If continuous color distribution is used, the flood color will vary linearly in all directions.
  • ContourType.Overlay - Combines the above two options.
  • ContourType.AverageCell - Floods cells or finite elements with colors from a color map according to the average value of the contour variable over the data points bounding the cell. If the variables are located at the nodes, the values at the nodes are averaged. If the variables are cell-centered, the cell-centered values are averaged to the nodes and the nodes are then averaged.
  • ContourType.PrimaryValue - Floods cells or finite elements with colors from a color map according to the primary value of the contour variable for each cell. If the variable is cell centered, the primary value is the value assigned to the cell. If the variable is node located, the primary value comes from the lowest index node in the cell. If the variables are located at the nodes, the value of the lowest indexed node in the cell is used. When plotting IJK-ordered, FE-brick or FE-tetra cells, each face is considered independently of the other faces. You may get different colors on the different faces of the same cell. If the variables are cell-centered, the cell-centered value is used directly. When plotting I, J, or K-planes in 3D, the cell on the positive side of the plane supplies the value, except in the case of the last plane, where the cell on the negative side supplies the value.

Example usage:

>>> plot.isosurface(0).contour.show = True
>>> plot.isosurface(0).contour.contour_type = ContourType.Flood
IsosurfaceContour.flood_contour_group

Contour group to use for flooding.

Type:ContourGroup

Changing style on this ContourGroup will affect all fieldmaps on the same Frame that use it.

Example usage:

>>> group = plot.contour(1)
>>> contour = plot.isosurface(1).contour
>>> contour.flood_contour_group = group
IsosurfaceContour.flood_contour_group_index

The Index of the ContourGroup to use for flooding.

Type:Index (zero-based index)

This property sets and gets, by Index, the ContourGroup used for flooding. Changing style on this ContourGroup will affect all fieldmaps on the same Frame that use it.

Example usage:

>>> contour = plot.isosurface(0).contour
>>> contour.flood_contour_group_index = 1
IsosurfaceContour.line_color

Color of contour lines.

Type:Color or ContourGroup

Contour lines can be a solid color or be colored by a ContourGroup as obtained through the plot.contour property.

Example usage:

>>> plot.show_isosurfaces = True
>>> plot.isosurface(0).contour.line_color = Color.Blue
IsosurfaceContour.line_contour_group

The contour group to use for contour lines.

Type:ContourGroup

Note that changing style on this ContourGroup will affect all other fieldmaps on the same Frame that use it.

Example usage:

>>> contour = plot.isosurface(0).contour
>>> group = plot.contour(1)
>>> contour.line_contour_group = group
IsosurfaceContour.line_contour_group_index

The Index of the ContourGroup to use for contour lines.

Type:integer (zero-based index)

This property sets and gets, by Index, the ContourGroup used for line placement. Although all properties of the ContourGroup can be manipulated through this object, many of them (i.e., color) will not affect the lines unless the FieldmapContour.line_color is set to the same ContourGroup. Note that changing style on this ContourGroup will affect all other fieldmaps on the same Frame that use it.

Example usage:

>>> contour = plot.isosurface(0).contour
>>> contour.line_contour_group_index = 2
IsosurfaceContour.line_thickness

Contour line thickness as a percentage of frame width.

Suggested values are one of: .02, .1, .4, .8, 1.5

Type:float

Example usage:

>>> plot.show_isosurfaces = True
>>> plot.isosurface(0).contour.line_thickness = .4
IsosurfaceContour.show

Show contours on isosurfaces.

Type:boolean

Example usage:

>>> plot.isosurface(0).contour.show = True
IsosurfaceContour.use_lighting_effect

Enable lighting effect.

Type:Boolean

When set to True, the lighting effect may be selected with the IsosurfaceEffects.lighting_effect attribute.

Note

Setting IsosurfaceContour.use_lighting_effect will also set the same value for IsosurfaceShade.use_lighting_effect, and vice-versa.

Example usage:

>>> plot.isosurface(0).shade.use_lighting_effect = True
>>> plot.isosurface(0).effects.lighting_effect = LightingEffect.Paneled

IsosurfaceEffects

class tecplot.plot.IsosurfaceEffects(contour)[source]

Effects of the isosurface group.

import tecplot as tp
from os import path
from tecplot.plot import IsosurfaceGroup
from tecplot.constant import LightingEffect

examples_dir = tp.session.tecplot_examples_directory()
datafile = path.join(examples_dir, '3D_Volume', 'ductflow.plt')
dataset = tp.data.load_tecplot(datafile)

plot = tp.active_frame().plot()
plot.contour(0).variable = dataset.variable('U(M/S)')

plot.show_isosurfaces = True
iso = plot.isosurface(0)
iso.shade.use_lighting_effect = True

iso.effects.lighting_effect = LightingEffect.Paneled
iso.effects.use_translucency = True
iso.effects.surface_translucency = 80

tp.export.save_png('isosurface_effects.png', 600)
../_images/isosurface_effects.png

Attributes

lighting_effect Lighting effect.
surface_translucency Surface translucency of the isosurface group.
use_translucency Enable surface translucency for this isosurface group.
IsosurfaceEffects.lighting_effect

Lighting effect.

Type:LightingEffect

Isosurface lighting effects must be enabled by setting IsosurfaceShade.use_lighting_effect to True when setting this value.

There are two types of lighting effects: Paneled and Gouraud:

  • Paneled: Within each cell, the color assigned to each area by

    shading or contour flooding is tinted by a shade constant across the cell. This shade is based on the orientation of the cell relative to your 3D light source.

  • Gouraud: This offers smoother, more continuous shading than

    Paneled shading, but it also results in slower plotting and larger print files. Gouraud shading is not continuous across zone boundaries unless face neighbors are specified in the data. Gouraud shading is not available for finite element volume Zone when blanking is active. The zone’s lighting effect reverts to Paneled shading in this case.

Example usage:

>>> plot.isosurface(0).shade.use_lighting_effect = True
>>> plot.isosurface(0).effects.lighting_effect = LightingEffect.Paneled
IsosurfaceEffects.surface_translucency

Surface translucency of the isosurface group.

Type:integer

Iso-surface surface translucency must be enabled by setting IsosurfaceEffects.use_translucency = True when setting this value.

Valid translucency values range from one (opaque) to 99 (translucent).

Example usage:

>>> plot.isosurface(0).effects.use_translucency = True
>>> plot.isosurface(0).effects.surface_translucency = 20
IsosurfaceEffects.use_translucency

Enable surface translucency for this isosurface group.

Type:boolean

The surface translucency value can be changed by setting IsosurfaceEffects.surface_translucency.

Example usage:

>>> plot.isosurface(0).effects.use_translucency = True
>>> plot.isosurface(0).effects.surface_translucency = 20

IsosurfaceMesh

class tecplot.plot.IsosurfaceMesh(mesh)[source]

Mesh attributes of the isosurface group.

import tecplot as tp
from os import path
from tecplot.plot import IsosurfaceGroup
from tecplot.constant import Color

examples_dir = tp.session.tecplot_examples_directory()
datafile = path.join(examples_dir, '3D_Volume', 'ductflow.plt')
dataset = tp.data.load_tecplot(datafile)

plot = tp.active_frame().plot()
plot.contour(0).variable = dataset.variable('U(M/S)')
plot.show_isosurfaces = True

iso = plot.isosurface(0)
iso.shade.use_lighting_effect = True
iso.contour.show = True
iso.mesh.show = True
iso.mesh.color = Color.Black
iso.mesh.line_thickness = 0.4

tp.export.save_png('isosurface_mesh.png', 600)
../_images/isosurface_mesh.png

Attributes

color Isosurface mesh color.
line_thickness Isosurface mesh line thickness.
show Display the mesh on isosurfaces.
IsosurfaceMesh.color

Isosurface mesh color.

Type:Color or ContourGroup

Iso-surface mesh lines can be a solid color or be colored by a ContourGroup as obtained through the plot.contour property.

Example usage:

>>> plot.isosurface(0).mesh.show = True
>>> plot.isosurface(0).mesh.color = Color.Blue
IsosurfaceMesh.line_thickness

Isosurface mesh line thickness.

Type:float

Suggested values are .002, .1, .4, .8, 1.5

Example usage:

>>> plot.isosurface(0).mesh.show = True
>>> plot.isosurface(0).mesh.line_thickness = .4
IsosurfaceMesh.show

Display the mesh on isosurfaces.

Type:boolean

Example usage:

>>> plot.isosurface(0).mesh.show = True

IsosurfaceShade

class tecplot.plot.IsosurfaceShade(contour)[source]

Shade attributes of the isosurface group.

import tecplot as tp
from os import path
from tecplot.plot import IsosurfaceGroup
from tecplot.constant import Color, LightingEffect

examples_dir = tp.session.tecplot_examples_directory()
datafile = path.join(examples_dir, '3D_Volume', 'ductflow.plt')
dataset = tp.data.load_tecplot(datafile)

plot = tp.active_frame().plot()
plot.show_isosurfaces = True
plot.contour(0).variable = dataset.variable('U(M/S)')
iso = plot.isosurface(0)

iso.contour.show = False  # Hiding the contour will reveal the shade.

iso.shade.show = True
iso.shade.color = Color.Red
iso.shade.use_lighting_effect = True

iso.effects.lighting_effect = LightingEffect.Paneled

tp.export.save_png('isosurface_shade.png', 600)
../_images/isosurface_shade.png

Attributes

color Shade color.
show Show shade attributes.
use_lighting_effect Enable lighting effect.
IsosurfaceShade.color

Shade color.

Type:Color

Color.MultiColor and Color.RGBColor coloring are not available. Use flooded contours for multi-color or RGB flooding

Example usage:

>>> plot.isosurface(0).shade.show = True
>>> plot.isosurface(0).shade.color = Color.Blue
IsosurfaceShade.show

Show shade attributes.

Type:boolean

Example usage:

>>> plot.isosurface(0).shade.show = True
IsosurfaceShade.use_lighting_effect

Enable lighting effect.

Type:Boolean

When set to True, the lighting effect may be selected with the IsosurfaceEffects.lighting_effect attribute.

Note

Setting IsosurfaceShade.use_lighting_effect will also set the same value for IsosurfaceContour.use_lighting_effect, and vice-versa.

Example usage:

>>> plot.isosurface(0).shade.use_lighting_effect = True
>>> plot.isosurface(0).effects.lighting_effect = LightingEffect.Paneled

Slice

SliceGroup

class tecplot.plot.SliceGroup(index, plot)[source]

Change attributes associated with slices.

Slices can include lighting effects, contours, meshes, and more. To customize these and other attributes of slices, use this object.

This object controls the style for a specific slice group within a Frame. Slice contour, vector, edge, effects, mesh, visibility and position information are accessed through this class.

from os import path
import tecplot as tp
from tecplot.constant import SliceSurface, ContourType

examples_dir = tp.session.tecplot_examples_directory()
datafile = path.join(examples_dir, '3D_Volume', 'ductflow.plt')
dataset = tp.data.load_tecplot(datafile)

plot = tp.active_frame().plot()
plot.contour(0).variable = dataset.variable('U(M/S)')

vector_3D = tp.plot.Vector3D(plot)
vector_3D.u_variable_index = 3  # U(M/S)
vector_3D.v_variable_index = 4  # V(M/S)
vector_3D.w_variable_index = 5  # W(M/S)

plot.show_slices = True
slice_0 = plot.slice(0)

slice_0.contour.show = True
slice_0.contour.contour_type = ContourType.Overlay  # AKA "Both lines and flood"

slice_0.effects.use_translucency = True
slice_0.effects.surface_translucency = 30

slice_0.show_start_and_end_slices = True

# Show an arbitrary slice
slice_0.orientation = SliceSurface.Arbitrary
slice_0.arbitrary_normal = (1, -.25, 0)
slice_0.origin = (.19, .5, .25)  # AKA Primary Slice Position

slice_0.show_start_and_end_slices = True
slice_0.start_position = (-.21, .05, .025)
slice_0.end_position = (1.342, .95, .475)
slice_0.show_intermediate_slices = True
slice_0.num_intermediate_slices = 3

slice_0.vector.show = True

slice_0.edge.show = True
slice_0.edge.line_thickness = 0.4

tp.export.save_png('slice_example.png', 300)
../_images/slice_example.png

Up to eight different slice groups can be set. Each slice group can use different slice planes or different ranges for the same slice plane.

>>> slice_3 = plot.slice(3)
>>> slice_3.contour.show = True

Attributes

arbitrary_normal Normal for arbitrary slices.
contour Contour attributes for the slice group.
edge Edge attributes for this slice group.
effects Effects attributes for this slice group.
end_position Position of the end slice.
mesh Mesh attributes for this slice group.
num_intermediate_slices Number of intermediate slicing planes.
obey_source_zone_blanking Obey source zone blanking.
orientation Select which plane the slice is drawn on (X,Y,Z, I, J, K or arbitrary).
origin Origin of the slice.
shade Shade attributes for this slice group.
show Show slices for this slice group.
show_intermediate_slices Show intermediate slices.
show_primary_slice Include the primary slice (first slice placed) in the Plot.
show_start_and_end_slices Include start and end slices.
slice_source Zones to slice through.
start_position Position of the start slice.
vector Vector attributes for this slice group.

Methods

set_arbitrary_from_points(p1, p2, p3) Set an arbitrary slice from 3 points.
SliceGroup.arbitrary_normal

Normal for arbitrary slices.

Type:3-tuple of floats

Example usage:

>>> plot.slice(0).orientation = SliceSurface.Arbitrary
>>> plot.slice(0).arbitrary_normal = (0.1, 0.2, 0.3)
>>> plot.slice(0).arbitrary_normal.x
0.1
>>> plot.slice(0).arbitrary_normal.y
0.2
>>> plot.slice(0).arbitrary_normal.z
0.3
SliceGroup.contour

Contour attributes for the slice group.

Type:SliceContour

Example usage:

>>> plot.slice(0).contour.show = True
SliceGroup.edge

Edge attributes for this slice group.

Type:SliceEdge

Example usage:

>>> plot.slice(0).edge.show = True
SliceGroup.effects

Effects attributes for this slice group.

Type:SliceEffects

Example usage:

>>> plot.slice(0).effects.use_translucency = True
SliceGroup.end_position

Position of the end slice.

SliceGroup.show_start_and_end_slices must be True to show the end slice.

Type:3-tuple of floats

Example usage:

>>> plot.slice(0).show_start_and_end_slices = True
>>> plot.slice(0).end_position = (1, 1, 1)
>>> plot.slice(0).end_position.i
1
SliceGroup.mesh

Mesh attributes for this slice group.

Type:SliceMesh

Example usage:

>>> plot.slice(0).mesh.show = True
SliceGroup.num_intermediate_slices

Number of intermediate slicing planes.

You may specify between 1 and 5,000 intermediate slices.

Type:integer

Example usage:

>>> # Show 2 intermediate slices
>>> plot.slice(0).num_intermediate_slices = 2
SliceGroup.obey_source_zone_blanking

Obey source zone blanking.

When set to True, slices are subject to any blanking used for the data. When set to False, slices are generated for blanked and unblanked regions.

Type:boolean

Example usage:

>>> plot.slice(0).obey_source_zone_blanking = True
SliceGroup.orientation

Select which plane the slice is drawn on (X,Y,Z, I, J, K or arbitrary).

Type:SliceSurface

You may also choose SliceSurface.Arbitrary to place the slice on an arbitrary plane.

To orient slices in an arbitrary direction, choose SliceSurface.Arbitrary. As with other slices, you may specify origin points for a primary slice and/or for start and end slices. Slices pass through the indicated origin point(s), so you can easily align the edge of a slice or group of slices along some other feature of the plot, such as an axis. If intermediate slices are activated, they are drawn equally spaced between the slices defined by the start and end origins.

Example usage:

>>> plot.slice(0).orientation = SliceSurface.XPlanes
SliceGroup.origin

Origin of the slice.

Type:3-tuple of floats

For arbitrary slice orientation, the origin can be any location. For axis orientations (XPlanes, YPlanes, etc.) two of the three components are not used.

Example usage:

>>> slice_0 = plot.slice(0)
>>> slice_0.orientation = SliceSurface.IPlanes
>>> slice_0.origin = (1, 0, 0)
>>> dx = (1, 1, 1)
>>> slice_0.origin += dx
>>> slice_0.origin.i
2
>>> slice_0.origin.j
1
>>> slice_0.origin.k
1

>>> slice_0.orientation = SliceSurface.Arbitrary
>>> slice_0.origin = (.5, .1, .1)
>>> slice_0.origin += dx
>>> slice_0.origin.x
1.5
>>> slice_0.origin.y
.1
>>> slice_0.origin.z
.1
SliceGroup.set_arbitrary_from_points(p1, p2, p3)[source]

Set an arbitrary slice from 3 points.

Set the normal and origin of an arbitrary slice using three points. The origin will be set to the 3rd point.

The three points must not be coincident or collinear. The slice’s origin is set to the third point and its normal is recalculated such that the cutting plane passes through all three points.

Parameters:

p1:  3-`tuple` of floats
p2:  3-`tuple` of floats
p3:  3-`tuple` of floats

Example usage:

>>> slice_0 = plot.slice(0)
>>> slice_0.set_arbitrary_from_points((0,0,0), (.1,.2,.3), (.1,.1,.1))
SliceGroup.shade

Shade attributes for this slice group.

Type:SliceShade

Example usage:

>>> plot.slice(0).shade.show = True
SliceGroup.show

Show slices for this slice group.

Type:bool

Example usage:

>>> plot.slice(0).show = True
SliceGroup.show_intermediate_slices

Show intermediate slices.

Intermediate slices are evenly distributed between the start and end slices.

Example usage:

>>> plot.slice(0).show_intermediate_slices = True
SliceGroup.show_primary_slice

Include the primary slice (first slice placed) in the Plot.

Type:bool

Example usage:

>>> plot.slice(0).show = True
>>> plot.slice(0).show_primary_slice = True
SliceGroup.show_start_and_end_slices

Include start and end slices.

Type:boolean

Example usage:

>>> plot.slice(0).show_start_and_end_slices = True
SliceGroup.slice_source

Zones to slice through.

Choose to slice through volume Zones, surface Zones, or the surfaces of volume Zones.

Type:SliceSource

Example usage:

>>> plot.slice(0).slice_source = SliceSource.SurfaceZones
SliceGroup.start_position

Position of the start slice.

SliceGroup.show_start_and_end_slices must be True to show the start slice.

Type:3-tuple of floats

Example usage:

>>> plot.slice(0).show_start_and_end_slices = True
>>> plot.slice(0).start_position = (1, 1, 1)
>>> plot.slice(0).start_position.i
1
SliceGroup.vector

Vector attributes for this slice group.

Type:SliceVector

Example usage:

>>> plot.slice(0).vector.show = True

SliceContour

class tecplot.plot.SliceContour(parent_slice)[source]

Contour attributes of the slice group.

from os import path
import tecplot as tp
from tecplot.constant import SliceSurface, ContourType

examples_dir = tp.session.tecplot_examples_directory()
datafile = path.join(examples_dir, '3D_Volume', 'ductflow.plt')
dataset = tp.data.load_tecplot(datafile)

plot = tp.active_frame().plot()

plot.show_slices = True
slice_0 = plot.slice(0)

plot.contour(0).variable = dataset.variable('U(M/S)')
slice_0.contour.show = True
slice_0.contour.contour_type = ContourType.Overlay  # AKA "Both lines and flood"

slice_0.show_start_and_end_slices = True

# Show an arbitrary slice
slice_0.orientation = SliceSurface.Arbitrary
slice_0.arbitrary_normal = (1, -.25, 0)
slice_0.origin = (.19, .5, .25)  # AKA Primary Slice Position

slice_0.show_start_and_end_slices = True
slice_0.start_position = (-.21, .05, .025)
slice_0.end_position = (1.342, .95, .475)
slice_0.show_intermediate_slices = True
slice_0.num_intermediate_slices = 3

tp.export.save_png('slice_contour.png', 600)
../_images/slice_contour.png

Attributes

contour_type Contour type for the slice contours.
flood_contour_group Contour group to use for flooding.
flood_contour_group_index The Index of the ContourGroup to use for flooding.
line_color Color of contour lines.
line_contour_group Contour group to use for contour lines.
line_contour_group_index The Index of the ContourGroup to use for contour lines.
line_thickness Contour line thickness as a percentage of frame width.
show Show contours on the slice.
use_lighting_effect Enable lighting effect.
SliceContour.contour_type

Contour type for the slice contours.

Type:ContourType

Example usage:

>>> plot.show_slices = True
>>> plot.slice(0).contour.contour_type = ContourType.AverageCell
SliceContour.flood_contour_group

Contour group to use for flooding.

Type:ContourGroup

Changing style on this ContourGroup will affect all fieldmaps on the same Frame that use it.

Example usage:

>>> group = plot.contour(1)
>>> contour = plot.slice(1).contour
>>> contour.flood_contour_group = group
SliceContour.flood_contour_group_index

The Index of the ContourGroup to use for flooding.

Type:Index (zero-based index)

This property sets and gets, by Index, the ContourGroup used for flooding. Changing style on this ContourGroup will affect all fieldmaps on the same Frame that use it.

Example usage:

>>> plot.show_slices = True
>>> contour = plot.slice(0).contour
>>> contour.flood_contour_group_index = 1
SliceContour.line_color

Color of contour lines.

Selecting Color.MultiColor will color the slice contour lines based on the contour group variable.

Type:Color

Example usage:

>>> plot.show_slices = True
>>> plot.slice(0).contour.line_color = Color.Blue
SliceContour.line_contour_group

Contour group to use for contour lines.

Type:ContourGroup

Changing style on this ContourGroup will affect all fieldmaps on the same Frame that use it.

Example usage:

>>> group = plot.contour(1)
>>> contour = plot.slice(1).contour
>>> contour.line_contour_group = group
SliceContour.line_contour_group_index

The Index of the ContourGroup to use for contour lines.

Type:integer (zero-based index)

This property sets and gets, by Index, the ContourGroup used for line placement. Although all properties of the ContourGroup can be manipulated through this object, many of them (i.e., color) will not affect the lines unless the FieldmapContour.line_color is set to the same ContourGroup. Note that changing style on this ContourGroup will affect all other fieldmaps on the same Frame that use it.

Example usage:

>>> plot.show_slices = True
>>> contour = plot.slice(0).contour
>>> contour.line_contour_group_index = 2
SliceContour.line_thickness

Contour line thickness as a percentage of frame width.

Suggested values are one of: .02, .1, .4, .8, 1.5

Type:float

Example usage:

>>> plot.show_slices = True
>>> plot.slice(0).contour.line_thickness = .4
SliceContour.show

Show contours on the slice.

Type:bool

Example usage:

>>> plot.show_slices = True
>>> plot.slice(1).contour.show = True
SliceContour.use_lighting_effect

Enable lighting effect.

Note

Setting SliceContour.use_lighting_effect will also set the same value for SliceShade.use_lighting_effect, and vice-versa.

The lighting effect is set with SliceEffects.lighting_effect, and may be one of LightingEffect.Gouraud or LightingEffect.Paneled.

Type:boolean

Example usage:

>>> plot.show_slices = True
>>> contour = plot.slice(0).contour
>>> contour.use_lighting_effect = True
>>> plot.slice(0).effects.lighting_effect = LightingEffect.Paneled

SliceEdge

class tecplot.plot.SliceEdge(vector)[source]

Edge attributes of the slice group.

When enabled, selected edge lines of all slices in this group will be shown.

from os import path
import tecplot as tp

examples_dir = tp.session.tecplot_examples_directory()
datafile = path.join(examples_dir, '3D_Volume', 'ductflow.plt')
dataset = tp.data.load_tecplot(datafile)

plot = tp.active_frame().plot()

plot.show_slices = True
slice_0 = plot.slice(0)

plot.contour(0).variable = dataset.variable('U(M/S)')

slice_0.edge.show = True
slice_0.edge.line_thickness = 0.8

tp.export.save_png('slice_edge.png', 600)
../_images/slice_edge.png

Attributes

color Edge color.
edge_type Edge type.
line_thickness Edge line thickness as a percentage of frame width.
show Show edges.
SliceEdge.color

Edge color.

Type:Color

Example usage:

>>> plot.slice(0).edge.show = True
>>> plot.slice(0).edge.color = Color.Blue
SliceEdge.edge_type

Edge type.

Type:EdgeType

There are two types of edges in Tecplot 360 EX: creases and borders.

An edge border is the boundary of a Zone. An edge crease appears when the inside angle between two cells is less than a user-defined limit. The inside angle can range from 0-180 degrees (where 180 degrees indicates coplanar surfaces). The default inside angle for determining an edge crease is 135 degrees.

Example usage:

>>> plot.slice(0).edge.show = True
>>> plot.slice(0).edge.edge_type = EdgeType.BordersAndCreases
SliceEdge.line_thickness

Edge line thickness as a percentage of frame width.

Type:float

Example usage:

>>> plot.slice(0).edge.show = True
>>> plot.slice(0).edge.line_thickness = .8
SliceEdge.show

Show edges.

This property must be set to True to show any of the other edge properties.

Type:boolean

Example usage:

>>> plot.slice(0).edge.show = True
>>> plot.slice(0).edge.edge_type = EdgeType.BordersAndCreases

SliceEffects

class tecplot.plot.SliceEffects(effects)[source]

Slice effects for this slice.

from os import path
import tecplot as tp

examples_dir = tp.session.tecplot_examples_directory()
datafile = path.join(examples_dir, '3D_Volume', 'ductflow.plt')
dataset = tp.data.load_tecplot(datafile)

plot = tp.active_frame().plot()

plot.show_slices = True
slice_0 = plot.slice(0)

plot.contour(0).variable = dataset.variable('U(M/S)')
slice_0.contour.show = True

slice_0.effects.use_translucency = True
slice_0.effects.surface_translucency = 70

tp.export.save_png('slice_effects.png', 600)
../_images/slice_effects.png

Attributes

lighting_effect Lighting effect.
surface_translucency Surface translucency of the slice group.
use_translucency Enable surface translucency for this slice group.
SliceEffects.lighting_effect

Lighting effect.

Type:LightingEffect

Slice lighting effects must be enabled by setting SliceContour.use_lighting_effect or SliceShade.use_lighting_effect to True when setting this value.

There are two types of lighting effects: Paneled and Gouraud:

  • Paneled: Within each cell, the color assigned to each area by

    shading or contour flooding is tinted by a shade constant across the cell. This shade is based on the orientation of the cell relative to your 3D light source.

  • Gouraud: This offers smoother, more continuous shading than

    Paneled shading, but it also results in slower plotting and larger print files. Gouraud shading is not continuous across zone boundaries unless face neighbors are specified in the data. Gouraud shading is not available for finite element volume Zones when blanking is active. The zone’s lighting effect reverts to Paneled shading in this case.

Example usage:

>>> plot.slice(0).contour.use_lighting_effect = True
>>> plot.slice(0).effects.lighting_effect = LightingEffect.Paneled
SliceEffects.surface_translucency

Surface translucency of the slice group.

Type:integer

Slice surface translucency must be enabled by setting SliceEffects.use_translucency = True when setting this value.

Valid slice translucency values range from one (opaque) to 99 (translucent).

Example usage:

>>> plot.slice(0).effects.use_translucency = True
>>> plot.slice(0).effects.surface_translucency = 20
SliceEffects.use_translucency

Enable surface translucency for this slice group.

Type:boolean

The surface translucency value can be changed by setting SliceEffects.surface_translucency.

Example usage:

>>> plot.slice(0).effects.use_translucency = True
>>> plot.slice(0).effects.surface_translucency = 20

SliceMesh

class tecplot.plot.SliceMesh(mesh)[source]

Mesh attributes of the slice group.

from os import path
import tecplot as tp
from tecplot.constant import SliceSurface, ContourType

examples_dir = tp.session.tecplot_examples_directory()
datafile = path.join(examples_dir, '3D_Volume', 'ductflow.plt')
dataset = tp.data.load_tecplot(datafile)
plot = tp.active_frame().plot()
plot.show_slices = True
plot.contour(0).variable = dataset.variable('U(M/S)')

plot.slice(0).mesh.show = True

tp.export.save_png('slice_mesh.png', 300)
../_images/slice_mesh.png

Attributes

color Slice mesh line Color or ContourGroup.
line_thickness Mesh line thickness.
show Show mesh lines.
SliceMesh.color

Slice mesh line Color or ContourGroup.

Type:Color or ContourGroup

Slice mesh lines can be a solid color or be colored by a ContourGroup as obtained through the plot.contour property.

Example usage:

>>> plot.slice(0).mesh.show = True
>>> plot.slice(0).mesh.color = Color.Green
SliceMesh.line_thickness

Mesh line thickness.

Type:float

The mesh line thickness is specified as a percentage of the frame width.

Example usage:

>>> plot.slice(0).mesh.show = True
>>> plot.slice(0).mesh.line_thickness = 0.8
SliceMesh.show

Show mesh lines.

Type:boolean

Example usage:

>>> plot.slice(0).mesh.show = True

SliceShade

class tecplot.plot.SliceShade(shade)[source]

Shade attributes of the slice group.

Show shading on the slice when SliceContour.show has not been selected or is set to ContourType.Lines.

from os import path
import tecplot as tp
from tecplot.constant import Color

examples_dir = tp.session.tecplot_examples_directory()
datafile = path.join(examples_dir, '3D', 'pyramid.plt')
dataset = tp.data.load_tecplot(datafile)

plot = tp.active_frame().plot()
plot.show_slices = True
plot.slice(0).contour.show = False
shade = plot.slice(0).shade
shade.show = True
shade.color = Color.Red  # Slice will be colored solid red.
tp.export.save_png('slice_shade.png', 300)
../_images/slice_shade.png

Attributes

color Shade color.
show Show shade attributes.
use_lighting_effect Use lighting effect.
SliceShade.color

Shade color.

Type:Color

Color.MultiColor and Color.RGBColor coloring are not available. Use flooded contours for multi-color or RGB flooding

Example usage:

>>> plot.slice(0).shade.show = True
>>> plot.slice(0).shade.color = Color.Blue
SliceShade.show

Show shade attributes.

Type:boolean

Example usage:

>>> plot.slice(0).shade.show = True
SliceShade.use_lighting_effect

Use lighting effect.

When set to True, the lighting effect may be selected with the SliceEffects.lighting_effect attribute.

Note

Setting SliceShade.use_lighting_effect will also set the same value for SliceContour.use_lighting_effect, and vice-versa.

Type:Boolean

Example usage:

>>> plot.slice(0).shade.use_lighting_effect = True
>>> plot.slice(0).effects.lighting_effect = LightingEffect.Paneled

SliceVector

class tecplot.plot.SliceVector(vector)[source]

Vector attributes of the slice group.

from os import path
import tecplot as tp

examples_dir = tp.session.tecplot_examples_directory()
datafile = path.join(examples_dir, '3D', 'Arrow.plt')
dataset = tp.data.load_tecplot(datafile)

plot = tp.active_frame().plot()
plot.contour(0).variable_index = dataset.variable('Z').index

plot.show_slices = True

# Vector variables must be assigned before displaying
vector_3D = tp.plot.Vector3D(plot)
vector_3D.u_variable_index = 1
vector_3D.v_variable_index = 2
vector_3D.w_variable_index = 3

slice_vector = plot.slice(0).vector
slice_vector.show = True

tp.export.save_png('slice_vector.png', 300)
../_images/slice_vector.png

Attributes

arrowhead_style Arrowhead style of slice vectors.
color Set slice vector color.
is_tangent Use tangent vectors for slices.
line_thickness Vector line thickness as a percentage of the frame height.
show Show vectors on slices.
vector_type Type of vector for slices in this slice group.
SliceVector.arrowhead_style

Arrowhead style of slice vectors.

Type:ArrowheadStyle

Example usage:

>>> plot.slice(0).vector.show = True
>>> plot.slice(0).vector.arrowhead_style = ArrowheadStyle.Hollow
SliceVector.color

Set slice vector color.

Type:Color

Example usage:

>>> plot.slice(0).vector.show = True
>>> plot.slice(0).vector.color = Color.Red
SliceVector.is_tangent

Use tangent vectors for slices.

Type:boolean

Example usage:

>>> plot.slice(0).vector.show = True
>>> plot.slice(0).vector.is_tangent = True
SliceVector.line_thickness

Vector line thickness as a percentage of the frame height.

Type:float

Typical values are .02, .1, .4, .8, 1.5

Example usage:

>>> plot.slice(0).vector.show = True
>>> plot.slice(0).vector.line_thickness = .1
SliceVector.show

Show vectors on slices.

Type:boolean

Example usage:

>>> plot.slice(0).vector.show = True
SliceVector.vector_type

Type of vector for slices in this slice group.

Type:VectorType

Example usage:

>>> plot.slice(0).vector.show = True
>>> plot.slice(0).vector.vector_type = VectorType.MidAtPoint

Streamtraces

Streamtrace

class tecplot.plot.Streamtrace[source]

Streamtraces

StreamtraceRibbon

class tecplot.plot.StreamtraceRibbon[source]

Streamtrace ribbons

Viewport

ReadOnlyViewport

class tecplot.plot.ReadOnlyViewport(axes)[source]

Attributes

bottom (float) Bottom position of viewport relative to the Frame.
left (float) Left position of viewport relative to the Frame.
right (float) Right position of viewport relative to the Frame.
top (float) Top position of viewport relative to the Frame.
ReadOnlyViewport.bottom

(float) Bottom position of viewport relative to the Frame.

Type:float in percentage of frame height from the bottom of the frame.

Example usage:

>>> print(plot.axes.viewport.bottom)
10.0
ReadOnlyViewport.left

(float) Left position of viewport relative to the Frame.

Type:float in percentage of frame width from the left of the frame.

Example usage:

>>> print(plot.axes.viewport.left)
10.0
ReadOnlyViewport.right

(float) Right position of viewport relative to the Frame.

Type:float in percentage of frame width from the left of the frame.

Example usage:

>>> print(plot.axes.viewport.right)
90.0
ReadOnlyViewport.top

(float) Top position of viewport relative to the Frame.

Type:float in percentage of frame height from the bottom of the frame.

Example usage:

>>> print(plot.axes.viewport.top)
90.0

Viewport

class tecplot.plot.Viewport(axes)[source]

Attributes

bottom (float) Bottom position of viewport relative to the Frame.
left (float) Left position of viewport relative to the Frame.
right (float) Right position of viewport relative to the Frame.
top (float) Top position of viewport relative to the Frame.
Viewport.bottom

(float) Bottom position of viewport relative to the Frame.

Type:float in percentage of frame height from the bottom of the frame.

Example usage:

>>> print(plot.axes.viewport.bottom)
10.0
Viewport.left

(float) Left position of viewport relative to the Frame.

Type:float in percentage of frame width from the left of the frame.

Example usage:

>>> print(plot.axes.viewport.left)
10.0
Viewport.right

(float) Right position of viewport relative to the Frame.

Type:float in percentage of frame width from the left of the frame.

Example usage:

>>> print(plot.axes.viewport.right)
90.0
Viewport.top

(float) Top position of viewport relative to the Frame.

Type:float in percentage of frame height from the bottom of the frame.

Example usage:

>>> print(plot.axes.viewport.top)
90.0

Cartesian2DViewport

class tecplot.plot.Cartesian2DViewport(axes)[source]

Attributes

bottom (float) Bottom position of viewport relative to the Frame.
left (float) Left position of viewport relative to the Frame.
nice_fit_buffer Tolerance for viewport/frame fit niceness.
right (float) Right position of viewport relative to the Frame.
top (float) Top position of viewport relative to the Frame.
top_snap_target Target value for top when being adjusted or dragged.
top_snap_tolerance Tolerance for snapping to target value for top.
Cartesian2DViewport.bottom

(float) Bottom position of viewport relative to the Frame.

Type:float in percentage of frame height from the bottom of the frame.

Example usage:

>>> print(plot.axes.viewport.bottom)
10.0
Cartesian2DViewport.left

(float) Left position of viewport relative to the Frame.

Type:float in percentage of frame width from the left of the frame.

Example usage:

>>> print(plot.axes.viewport.left)
10.0
Cartesian2DViewport.nice_fit_buffer

Tolerance for viewport/frame fit niceness.

Type:float

Example usage:

>>> plot.axes.viewport.nice_fit_buffer = 20
Cartesian2DViewport.right

(float) Right position of viewport relative to the Frame.

Type:float in percentage of frame width from the left of the frame.

Example usage:

>>> print(plot.axes.viewport.right)
90.0
Cartesian2DViewport.top

(float) Top position of viewport relative to the Frame.

Type:float in percentage of frame height from the bottom of the frame.

Example usage:

>>> print(plot.axes.viewport.top)
90.0
Cartesian2DViewport.top_snap_target

Target value for top when being adjusted or dragged.

Type:float

Example usage:

>>> plot.axes.viewport.top_snap_target = 90
Cartesian2DViewport.top_snap_tolerance

Tolerance for snapping to target value for top.

Type:float

Example usage:

>>> plot.axes.viewport.top_snap_tolerance = 8

PolarViewport

class tecplot.plot.PolarViewport(axes)[source]

Attributes

border_color
border_thickness
bottom (float) Bottom position of viewport relative to the Frame.
fill_color
left (float) Left position of viewport relative to the Frame.
right (float) Right position of viewport relative to the Frame.
show_border
top (float) Top position of viewport relative to the Frame.
PolarViewport.border_color
PolarViewport.border_thickness
PolarViewport.bottom

(float) Bottom position of viewport relative to the Frame.

Type:float in percentage of frame height from the bottom of the frame.

Example usage:

>>> print(plot.axes.viewport.bottom)
10.0
PolarViewport.fill_color
PolarViewport.left

(float) Left position of viewport relative to the Frame.

Type:float in percentage of frame width from the left of the frame.

Example usage:

>>> print(plot.axes.viewport.left)
10.0
PolarViewport.right

(float) Right position of viewport relative to the Frame.

Type:float in percentage of frame width from the left of the frame.

Example usage:

>>> print(plot.axes.viewport.right)
90.0
PolarViewport.show_border
PolarViewport.top

(float) Top position of viewport relative to the Frame.

Type:float in percentage of frame height from the bottom of the frame.

Example usage:

>>> print(plot.axes.viewport.top)
90.0

View

Cartesian2DView

class tecplot.plot.Cartesian2DView(plot)[source]

Methods

fit()
Cartesian2DView.fit()

Cartesian3DView

class tecplot.plot.Cartesian3DView(plot)[source]

Methods

fit()
Cartesian3DView.fit()

LineView

class tecplot.plot.LineView(plot)[source]

Methods

fit()
LineView.fit()

PolarView

class tecplot.plot.PolarView(plot)[source]

Methods

fit()
PolarView.fit()