Contents Previous Next Subchapters

Creating Contour Plots
Syntax tpcontour(Z)
tpcontour(ZfloodStyle)
tpcontour(ZXY)
tpcontour(ZXYfloodStyle)
See Also tpframe , tpaddzone , tpzone , tpopen , tpxyzaxes

Description
Creates contour plots in Tecplot of O-Matrix data. The argument Z must be an integer, real, or double-precision matrix. If present, the argument floodStyle must be a character row vector which specifies the type of flooding. The value of floodStyle must be one of: "Flood", "Lines", or ""Lines&Flood". If present, the arguments X and Y must be integer, real or double-precision matrices whose row and column dimensions are equivalent to Z

Examples
If, at the O-Matrix prompt you enter
   Z = {[1,1,1],[1,2,2],[1,2,3]}
   tpcontour(Z)
O-Matrix will transfer the values of Z to Tecplot and create the following plot


If you continue the example by entering
   tpopen
   tpcontour(Z,"Lines&Flood")
O-Matrix will clear the current layout in Tecplot and re-generate the plot with both Lines and Flood.


If the values of X and Y are not specified O-Matrix creates and transfers to Tecplot values for X and Y which provide a regular grid for the contour of Z. For example, if contouring a 3 by 3 matrix, the following value will be transferred for X
{
[ 1, 2 , 3 ]
[ 1, 2 , 3 ]
[ 1, 2 , 3 ]
}
And the following value will be transferred for Y
{
[ 1 , 1 , 1 ]
[ 2 , 2 , 2 ]
[ 3 , 3 , 3 ]
}
If the values of X and Y are specified they can be used to define a grid that is not regular for the contour of Z. If at the O-Matrix prompt you enter,
   Z = {[1,1,1],[1,2,2],[1,2,3]}
   X = {[1,2,3],[1,2,3],[1,2,3]}
   Y = {[1,2,1],[2,2,2],[3,3,3]}
   tpframe("Irregular Y")
   tpcontour(Z,X,Y)
Tecplot will create a new frame, "Irregular Y" and generate the following plot which defines an irregular grid for Y.


If you continue the example by entering,
   X = {[1,2,3],[1,2,2],[1,2,3]}
   Y = {[1,1,1],[2,2,2],[3,3,3]}
   tpframe("Irregular X")
   tpcontour(Z,X,Y)
Tecplot will create a new frame, "Irregular X" and generate the following plot which defines an irregular grid for X.


The tpcontour function can use various zones of a single data set which can be useful for such features as creating animations. If, at the O-Matrix prompt you enter
   clear
   tpcontour(rand(10,10))
   for i = 1 to 9 begin
     tpaddzone(10,10);
     tpzone(i);
     tpcontour(rand(10,10))
   end
O-Matrix will create a Tecplot data set that contains 10 zones, where each zone contains a different 10 by 10 random valued matrix.