Home > . > plot_field.m

plot_field

PURPOSE ^

'plot_field': plot any field with the structure defined in the uvmat package

SYNOPSIS ^

function [PlotType,PlotParamOut,haxes]= plot_field(Data,haxes,PlotParam,KeepLim,PosColorbar)

DESCRIPTION ^

'plot_field': plot any field with the structure defined in the uvmat package
------------------------------------------------------------------------

  This function is used by uvmat to plot fields. It automatically chooses the representation 
 appropriate to the input field structure: 
     2D vector fields are represented by arrows, 2D scalar fiedlds by grey scale images or contour plots, 1D fields are represented by usual plot with (abscissa, ordinate).
  The input field structure is first tested by check_field_structure.m,
  then split into blocks of related variables  by find_field_indices.m.
  The dimensionality of each block is obtained  by this fuction
  considering the presence of variables with the attribute .Role='coord_x'
  and/or coord_y and/or coord_z (case of unstructured coordinates), or
  dimension variables (case of matrices). 

 function [PlotType,PlotParamOut,haxes]= plot_field(Data,haxes,PlotParam,KeepLim,PosColorbar)

 OUPUT:
 PlotType: type of plot: 'text','line'(curve plot),'plane':2D view,'volume'
 PlotParamOut: structure, representing the updated  plotting parameters, in case of automatic scaling
 haxes: handle of the plotting axis, when a new figure is created.

INPUT
    Data:   structure describing the field to plot 
         (optional) .ListGlobalAttribute: cell listing the names of the global attributes
                    .Att_1,Att_2... : values of the global attributes
         (requested)  .ListVarName: list of variable names to select (cell array of  char strings {'VarName1', 'VarName2',...} ) 
         (requested)  .VarDimName: list of dimension names for each element of .ListVarName (cell array of string cells)
                      .VarAttribute: cell of attributes for each element of .ListVarName (cell array of structures of the form VarAtt.key=value)
         (requested) .Var1, .Var2....: variables (Matlab arrays) with names listed in .ListVarName
  
            Variable attribute .Role :
    The only variable attribute used for plotting purpose is .Role which can take
    the values
       Role = 'scalar':  (default) represents a scalar field
            = 'coord_x', 'coord_y',  'coord_z': represents a separate set of
                        unstructured coordinate x, y  or z
            = 'vector': represents a vector field whose number of components
                is given by the last dimension (called 'nb_dim')
            = 'vector_x', 'vector_y', 'vector_z'  :represents the x, y or z  component of a vector  
            = 'warnflag' : provides a warning flag about the quality of data in a 'Field', default=0, no warning
            = 'errorflag': provides an error flag marking false data,
                   default=0, no error. Different non zero values can represent different criteria of elimination.

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:
Generated on Wed 10-Mar-2010 20:42:36 by m2html © 2003