Contents     Functions         Previous Next     PDF Index



General utilities for graphical user interfaces.


 comgui('Command', ...)
 cingui('Command', ...)

comgui is an open source function that the user is expected to call directly while cingui is closed source and called internally by SDT.

ImWrite, ...

ImwriteFileName.ext does a clean print of the current figure. It can be called as a command with the options detailed below. The same command can be used to prepare single or multiple image capture, it is then called using comgui('ImWrite',gf,RO) with options stored in the RO structure. For details on the structure, and for multi-image capture specific options, see iicom ImWrite.


comgui('fitlabel') attempts to replace axes of the current figure so that xlabel, ylabel, ... are not cropped.


Uniform formatting of figures is often a necessity. The cingui('objSet',h,Prop) is the SDT utility to store reusable formatting instructions. Prop is a cell array of tags and values classical in MATLAB properties with possible modifications.

For the property value, a replacement mechanism is provided if the value is a string starting with @.

 cingui('objset',1, ...       % Handle to the object to modify
   {'','@Rep{SmallWide}', ... % Predefined figure type
    '@line','@setlines(''marker'')'}) % Line sequencing


The def.Legend field is used to control dynamic generation of text associated with a given display. It is stored using the classical form of property/value pairs stored in a cell array, whose access can be manual or more robustly done with sdsetprop.

Accepted properties any text property (see doc text) and the specific, case ensitive, properties

 def.Legend={'set','legend -corner .1 .9 -reset', ... % Init
  'string',{'\it MyCube';'$title'}, ... % The legend strings
  'FontSize',12} % Other test properties
 def=sdsetprop(def,'Legend','ImWrite',{sdtdef('tempdir'),'FigRoot', ...
  2,1, ... % insert second and first legend lines in file name
  '.png'}) % Generate file as png
 comgui('imFTitle') % Display the file name used comgui('imwrite')

©1991-2012 by SDTools
Previous Up Next