Contents Previous Next Subchapters

Opening Tecplot Data, Layout and Style Files
Syntax tpopen()
tpopen(file)
See Also tpget , tpput , tpplot , tpaddzone

Description
If called without any arguments, the tpopen command creates a new layout in Tecplot. That is it has the same effect as selecting "File | New Layout" from the Tecplot menu. If present, the argument file must be a character row vector that specifies the name of a valid, existing layout, data or style file. The file suffix must be .LAY, .LPK, .PLT, or .STY.

Examples
If, at the O-Matrix prompt you enter,
   clear
   fName = [OM_INSTALL,"\example\tecplot\rainfall.plt"] 
   tpopen(fName)
Tecplot will open the rainfall data file from the O-Matrix example directory. You can obtain the displayed data from Tecplot by entering,
   rain = tpget("Seattle Rainfall")
   month = tpget("Month")
If you continue, by modifying the data and transferring the result back to Tecplot by entering,
   rain = rain - 1.0
   tpput(rain,"Seattle Rainfall")
You will get the following updated result in Tecplot


Using Tecplot to visualize data from O-Matrix solutions often involves interactively manipulating and customizing plots that have been generated with O-Matrix plotting functions or generated from data transferred from O-Matrix. You can save these interactive customizations as Tecplot style files and the re-apply them later from O-Matrix analysis scripts. If you enter,
   tpopen
   x = 0. : 0.1 : 2 * pi
   y = [sin(x), cos(x)]
   tpplot(y)
Tecplot will generate a simple line plot. You might make some interactive customizations of the plot which are saved in sinestyle.sty. If you continue the example by entering
   tpopen([OM_INSTALL,"\example\tecplot\sinestyle.sty"])
Tecplot will apply the saved style file and update the plot. After entering Ctrl-F in Tecplot, the plot will now look like,