Code covered by the BSD License  

Highlights from
OverlayTable

Be the first to rate this file! 9 Downloads (last 30 days) File Size: 9.35 KB File ID: #37688
image thumbnail

OverlayTable

by

 

01 Aug 2012 (Updated )

Create table overlays for figures which include full text formatting and support for symbols.

| Watch this File

File Information
Description

OverlayTable Make a fully formatable table displayed in a figure

Usage: [h,hbox] = OverlayTable(gcf,dataTable,left,top,width,height,varargin)
        [h,hbox] = OverlayTable(gcf,dataTable)

Note: The table is composed of annotation textboxes with one per cell in
the table. Full formatting of the table including fonts, colors, symbols,
superscripts and substripts is supported. Right click on the table to
display a context menu with extensive formatting and editing tools to
modify the appearance of the table (see below).

Acknowledgements
OverlayTable requires the wonderfully useful "GUI Layout Toolbox" written
by Ben Tordoff which is available from the MATLAB File Exchange.
OverlayTable also relies on a modified version of dsxy2figxy.m which
appears as an example in the MATLAB documentation.

Inputs
======
   hfig ................... Handle of figure in which the table will be
                    created.
   tableData .............. Cell array of strings or scalars to appear in
                    the table. The dimensions of the table (cells)
                    will match the dimensions of cell array.
   left ................... Left edge of table in normalized figure units
                    (0 = left edge of figure). If empty or absent
                    the user is prompted to select upper left
                    corner via the cursor.
   top .................... Top edge of table (1 = top of figure)
   width .................. Column widths in normalized units. If width
                    is a scalar then all columns have the same
                    width; if a vector each column has specified
                    width. If set to zero, empty or absent width
                    for each column is determined automatically.
   height ................. Column height. If set to zero, empty or
                    absent height for each row is set
                    automatically.
   varargin ............... Arguments passed directly to to annotation.
                    Any valid property,value pair for a textbox
                    annotation object may be included in this
                    argument.

Outputs
=======
   h ...................... Matrix of handles to text boxes (table cells).
                    Each entry in h is a handle of an individual
                    annotation textbox. Settings in the table can
                    be changed programatically using
                    set(h,prop,value) or interactively via the
                    context menu (see below).
   hbox ................... Handle to the bounding box for the table.

Context Menu Usage
===================
   Edit ................... Edit cell contents via OverlayTableEdit
   Move Table ............. Move the table on the current figure. User is
                    presented with cursors which should be used to
                    select the location of the upper left corner
                    of the new table location.
   Format
       Table .............. Apply selected formatting operation to the
                    entire table.
           Font Size ...... Change the table font size
           Font Weight .... Change the table font weight (bold/normal)
           Font Color ..... Change the table font color
           Font ........... Access to all font settings
           Alignment ...... Set the horizontal or vertical alignment of
                    the table entries.
           All ............ Access to ALL table settings via the
                    properties editor. WARNING - you have access
                    here to some settings that should not be
                    changed.
       Row ................ As above except settings are only applied to
                    the currently selected row .
       Column ............. Settings applied to the current column
       Cell ............... Settings applied only to the selected cell

   Insert ................. Insert a new column/row to the left/above the
                    currently selected cell.
   Append ................. Insert a new column/row to the right/below the
                    currently selected cell.
   Delete ................. Delete the selected column, row, or entire
                    table.
   Resize Now ............. Force an update to resize the table to match
                    the cell contents.
   Enable Auto-Size ....... If checked automatically update the table size
                    when settings/contents are changed. (Default
                    = enabled).

Acknowledgements

Gui Layout Toolbox inspired this file.

Required Products MATLAB
MATLAB release MATLAB 7.12 (R2011a)
Other requirements Requires "GUI Layout Toolbox" which is available in the File Exchange.
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Updates
02 Aug 2012

Minor bug fix.

Contact us