Saving your Plot: Stylesheets and Layouts (STY, LAY, LPK)

发布时间 2023-08-26 15:32:48作者: Cow_Boy

Description

We describe the uses and differences between Tecplot 360’s three different methods for saving the style and settings of your plot. These include stylesheets (STY files) linked data layouts (LAY files) and packaged data layouts (LPK files).

The Tecplot 360 stylesheet file type represents the style of your dataset in an individual Tecplot frame and has no link to any data. Stylesheets are useful if you want to apply a specific style to very similar data sets.

Whereas, a Tecplot linked layout file represents the style of ALL frames and ALL pages, including instructions and paths to retrieve and load the data. Use these when the layouts will always be near your data.

Finally, a Tecplot packaged layout file saves the same style settings except that a complete copy of the data is embedded in the file. This is good for sharing, but produces a larger file size as you are saving the data separately from the original data files.

To demonstrate how to use the style file and the two layout file options, we will be using two different data sets.

  1. Open the first data set file, zoom in on the area of interest, and do some quick style changes to the plot with the right click context menu. Once satisfied with the changes, Select Frame > Save frame style to save the style of this frame.
  2. Select the create frame tool to create a new frame and load in a new data set. Apply the stylesheet saved earlier to this new frame. Do this by going into Frame > Load frame style and selecting the STY file. Tile the frames so they can be seen together in a non-overlapping view. Notice how the angle and length of the contour differs by a slight amount in each frame.
  3. Comparing two data sets using the same stylesheet allows you to see subtle differences in your results.
  4. Now that there are two separate frames, a stylesheet will no longer capture the style of the entire workspace. For this, you’ll need to use a Layout file. Select File > Save Layout As. You will see the option to save as a Linked Data (*.lay) layout, or a Packaged Data (*.lpk) layout.
  5. For now, save as a Linked LAY file and open it in a text editor. For the Linked Data LAY file type, notice how the original data sets are referenced at the beginning of the file, and the commands to set up the Plots and Layout follow. This is different than the Packaged Data LPK file type, which contains copies of the original data sets as binary data, preceded by the Layout commands.

翻译:

说明
我们将介绍 Tecplot 360 保存绘图样式和设置的三种不同方法的用途和区别。这些方法包括样式表(STY 文件)、链接数据布局(LAY 文件)和打包数据布局(LPK 文件)。

Tecplot 360 样式表文件类型代表数据集在单个 Tecplot frame 中的样式,与任何数据都没有链接。如果要将特定样式应用于非常相似的数据集,Stylesheets就非常有用。

而 Tecplot 链接布局文件则代表ALL frames 和 ALL pages的样式,包括检索和加载数据的说明和路径。当布局总是靠近数据时,就可以使用这些布局文件。

最后,Tecplot 打包布局文件保存了相同的样式设置,但文件中嵌入了数据的完整副本。这有利于共享,但由于要将数据与原始数据文件分开保存,因此文件大小较大。

为了演示如何使用样式文件和两个布局文件选项,我们将使用两个不同的数据集。

  1. 打开第一个数据集文件,放大感兴趣的区域,然后使用右键右键菜单快速更改绘图样式。对更改满意后,选择 Frame > Save frame style 保存该框架的样式。
  2. 选择 "创建框架 "工具创建一个新框架,并载入一个新数据集。将之前保存的样式表应用到新框架中。方法是进入 Frame > Load frame style 并选择 STY file。将帧平铺在一起,这样就可以在不重叠的视图中看到它们。请注意每个帧中轮廓的角度和长度都略有不同。
  3. 使用相同的样式表比较两个数据集,可以看到结果的细微差别。
  4. 现在有了两个独立的帧,样式表就不能再捕捉整个工作区的样式了。为此,你需要使用布局文件。选择 File > Save Layout As。你会看到保存为Linked Data (*.lay) layout或Packaged Data (*.lpk) layout的选项。
  5. 现在,请将其保存为Linked LAY 文件,然后在文本编辑器中打开。对于Linked Data LAY 文件类型,请注意原始数据集是如何在文件开头被引用的,以及后面设置Plots 和 Layout的命令。这与Packaged Data LPK 文件类型不同,后者包含原始数据集的二进制数据副本,前面是Layout命令。