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.
- pytecplot-1.5.2.dist-info/LICENSE.html +77 -0
- pytecplot-1.5.2.dist-info/METADATA +508 -0
- pytecplot-1.5.2.dist-info/RECORD +97 -0
- pytecplot-1.5.2.dist-info/WHEEL +5 -0
- pytecplot-1.5.2.dist-info/top_level.txt +1 -0
- tecplot/__init__.py +94 -0
- tecplot/annotation/__init__.py +7 -0
- tecplot/annotation/annotation.py +223 -0
- tecplot/annotation/geometry.py +369 -0
- tecplot/annotation/georeference.py +33 -0
- tecplot/annotation/image.py +185 -0
- tecplot/annotation/iter.py +105 -0
- tecplot/annotation/polyline.py +381 -0
- tecplot/annotation/text.py +744 -0
- tecplot/constant.py +401 -0
- tecplot/data/__init__.py +34 -0
- tecplot/data/array.py +645 -0
- tecplot/data/create.py +1 -0
- tecplot/data/dataset.py +1809 -0
- tecplot/data/extract.py +544 -0
- tecplot/data/face_neighbors.py +494 -0
- tecplot/data/facemap.py +814 -0
- tecplot/data/load.py +2075 -0
- tecplot/data/nodemap.py +577 -0
- tecplot/data/operate.py +928 -0
- tecplot/data/query.py +334 -0
- tecplot/data/save.py +343 -0
- tecplot/data/variable.py +280 -0
- tecplot/data/zone.py +841 -0
- tecplot/exception.py +201 -0
- tecplot/export/__init__.py +13 -0
- tecplot/export/animation.py +521 -0
- tecplot/export/export_setup.py +318 -0
- tecplot/export/image.py +577 -0
- tecplot/export/print_setup.py +218 -0
- tecplot/export/time_animation.py +607 -0
- tecplot/extension/__init__.py +14 -0
- tecplot/extension/ipython.py +68 -0
- tecplot/layout/__init__.py +20 -0
- tecplot/layout/frame.py +1285 -0
- tecplot/layout/layout.py +488 -0
- tecplot/layout/page.py +541 -0
- tecplot/legend/__init__.py +4 -0
- tecplot/legend/contour_legend.py +516 -0
- tecplot/legend/legend.py +141 -0
- tecplot/legend/line_legend.py +66 -0
- tecplot/legend/rgb_coloring_legend.py +291 -0
- tecplot/legend/scatter_legend.py +136 -0
- tecplot/macro.py +339 -0
- tecplot/plot/__init__.py +62 -0
- tecplot/plot/axes.py +881 -0
- tecplot/plot/axis.py +1350 -0
- tecplot/plot/blanking.py +584 -0
- tecplot/plot/contour.py +1302 -0
- tecplot/plot/effects.py +162 -0
- tecplot/plot/fieldmap.py +2159 -0
- tecplot/plot/grid.py +758 -0
- tecplot/plot/isosurface.py +1167 -0
- tecplot/plot/labels.py +338 -0
- tecplot/plot/linemap.py +1905 -0
- tecplot/plot/linking.py +489 -0
- tecplot/plot/plot.py +1791 -0
- tecplot/plot/rgb_coloring.py +281 -0
- tecplot/plot/scatter.py +396 -0
- tecplot/plot/slice.py +1544 -0
- tecplot/plot/streamtrace.py +1949 -0
- tecplot/plot/symbol.py +567 -0
- tecplot/plot/ticks.py +666 -0
- tecplot/plot/title.py +380 -0
- tecplot/plot/vector.py +679 -0
- tecplot/plot/view.py +868 -0
- tecplot/session/__init__.py +112 -0
- tecplot/session/aux_data.py +276 -0
- tecplot/session/config.py +92 -0
- tecplot/session/session.py +425 -0
- tecplot/session/state_changed.py +225 -0
- tecplot/session/style.py +504 -0
- tecplot/tecutil/__init__.py +16 -0
- tecplot/tecutil/arglist.py +230 -0
- tecplot/tecutil/captured_output.py +177 -0
- tecplot/tecutil/constant.py +1312 -0
- tecplot/tecutil/index_set.py +118 -0
- tecplot/tecutil/lock.py +36 -0
- tecplot/tecutil/message_pb2.py +39 -0
- tecplot/tecutil/preamble.py +54 -0
- tecplot/tecutil/stringlist.py +114 -0
- tecplot/tecutil/sv.py +1662 -0
- tecplot/tecutil/tecutil.py +12402 -0
- tecplot/tecutil/tecutil_client.py +627 -0
- tecplot/tecutil/tecutil_connector.py +937 -0
- tecplot/tecutil/tecutil_rpc.py +6845 -0
- tecplot/tecutil/util.py +332 -0
- tecplot/text/__init__.py +3 -0
- tecplot/text/font.py +224 -0
- tecplot/text/label_format.py +374 -0
- tecplot/text/textbox.py +106 -0
- tecplot/version.py +41 -0
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Integration with Jupyter IPython Notebooks
|
|
3
|
+
------------------------------------------
|
|
4
|
+
|
|
5
|
+
The environment variables needed to run and start |PyTecplot| have to be set
|
|
6
|
+
when the Jupyter server is started for them to take effect for each notebook
|
|
7
|
+
created. This includes ``PATH`` for Windows, ``LD_LIBRARY_PATH`` for Linux
|
|
8
|
+
and ``DYLD_LIBRARY_PATH`` for Mac OS X (see `Installation` for details).
|
|
9
|
+
Once set, the notebook server can usually be started with the command::
|
|
10
|
+
|
|
11
|
+
jupyter notebook
|
|
12
|
+
|
|
13
|
+
Depending on your configuration, this may bring up your default web browser
|
|
14
|
+
showing the jupyter notebook interface.
|
|
15
|
+
"""
|
|
16
|
+
|
|
17
|
+
import importlib
|
|
18
|
+
import io
|
|
19
|
+
import logging
|
|
20
|
+
import os
|
|
21
|
+
import tempfile
|
|
22
|
+
import warnings
|
|
23
|
+
|
|
24
|
+
from .. import layout, export
|
|
25
|
+
|
|
26
|
+
log = logging.getLogger(__name__)
|
|
27
|
+
|
|
28
|
+
def show(frame=None, width=600):
|
|
29
|
+
"""Display a `Frame <layout.Frame>` as an image inline in a notebook.
|
|
30
|
+
|
|
31
|
+
Parameters:
|
|
32
|
+
frame (`Frame <layout.Frame>`, optional): The `Frame <layout.Frame>` to display. The active `Frame <layout.Frame>`
|
|
33
|
+
will be used if `None`. (default: `None`)
|
|
34
|
+
width (`int`, optional): Width of the image in pixels.
|
|
35
|
+
(default: 600)
|
|
36
|
+
|
|
37
|
+
Example::
|
|
38
|
+
|
|
39
|
+
>>> tecplot.load_layout('mylayout.lay')
|
|
40
|
+
>>> tecplot.extension.ipython.show()
|
|
41
|
+
|
|
42
|
+
This should put the resulting image just below the current cell in the
|
|
43
|
+
notebook.
|
|
44
|
+
"""
|
|
45
|
+
with warnings.catch_warnings():
|
|
46
|
+
warnings.filterwarnings("ignore", category=DeprecationWarning)
|
|
47
|
+
from PIL import Image
|
|
48
|
+
import IPython
|
|
49
|
+
|
|
50
|
+
frame = frame or layout.active_frame()
|
|
51
|
+
f = tempfile.NamedTemporaryFile(prefix=frame.name,
|
|
52
|
+
suffix='.png',
|
|
53
|
+
delete=False)
|
|
54
|
+
try:
|
|
55
|
+
with frame.activated():
|
|
56
|
+
frame.move_to_top()
|
|
57
|
+
f.close()
|
|
58
|
+
export.save_png(f.name, width)
|
|
59
|
+
with open(f.name, 'rb') as fimg:
|
|
60
|
+
im = Image.open(fimg)
|
|
61
|
+
b = io.BytesIO()
|
|
62
|
+
im.save(b, format='png')
|
|
63
|
+
IPython.display.display(IPython.display.Image(data=b.getvalue()))
|
|
64
|
+
finally:
|
|
65
|
+
try:
|
|
66
|
+
os.remove(f.name)
|
|
67
|
+
except OSError:
|
|
68
|
+
log.warning('could not remove temporary file: {}'.format(f.name))
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"""Pages, frames and other layout-related operations.
|
|
2
|
+
|
|
3
|
+
The "layout" consists of a stack of `Pages <tecplot.layout.Page>` identified by index or
|
|
4
|
+
`name <Page.name>`. Each `Page <tecplot.layout.Page>` consists of a single "workspace" which holds
|
|
5
|
+
a collection of `Frames <tecplot.layout.Frame>` that are laid out in relation to an area
|
|
6
|
+
called the `Paper`.
|
|
7
|
+
|
|
8
|
+
The |Tecplot Engine| is guaranteed to have at least one `Page <tecplot.layout.Page>` which is
|
|
9
|
+
holding onto at least one `Frame <tecplot.layout.Frame>`. It also has the concept of an active
|
|
10
|
+
`Frame <tecplot.layout.Frame>` and by extension, an active `Page <tecplot.layout.Page>`. Most, if not all operations
|
|
11
|
+
that require a handle to a `Frame <tecplot.layout.Frame>` will use the active `Frame <tecplot.layout.Frame>` by default.
|
|
12
|
+
This includes any function that operates on objects held by a `Frame <tecplot.layout.Frame>`
|
|
13
|
+
such as a `Cartesian3DFieldPlot` or `Dataset <tecplot.data.Dataset>`.
|
|
14
|
+
"""
|
|
15
|
+
|
|
16
|
+
from .frame import Frame
|
|
17
|
+
from .layout import (active_frame, active_page, add_page, aux_data, delete_page,
|
|
18
|
+
frames, next_page, num_pages, page, pages, next_page,
|
|
19
|
+
new_layout, load_layout, save_layout)
|
|
20
|
+
from .page import Page, Paper
|