Difference between revisions of "Other Commands"

From LIBISIS
Jump to navigation Jump to search
Line 63: Line 63:
 
** Standard defaults are used for any properties not set  
 
** Standard defaults are used for any properties not set  
  
[[image:Global and local properties.png|300px|Showing how global and local default properties are related]]
+
[[image:Global and local properties.png|500px|Showing how global and local default properties are related]]
  
 
==Undo Last Plot==
 
==Undo Last Plot==

Revision as of 10:21, 31 March 2008

Renaming a Plot

Because of the method used to keep track of plots (see here renaming a plot should be done through the rename command. This insures that any default properties associated with the plot are copied to the new name too.

>> rename(figureH, 'new_name', 'new_tag')
  • figureH is the figure handle of the plot to be renamed.
  • New name and tag will retain the same properties as the old name and tag.
  • Plot is copied to the new name and tag, any default properties associated already with the new name and tag will be lost
  • Only the figure handle may be used to identify the plot.

Getting Information From a Plot

Extracting Data

The fromplot function allows a user to gather as much data from a plot as possible. The plot need not be part of Libisis as long as it is made in Matlab. This is useful if the data used to make a plot using another Matlab application is not directly accessible or has been lost. Use the command

>> dataset = fromplot(figureH)
>> dataset = fromplot('property', value)
>> dataset = fromplot(figureH, 'property', value)
  • figureH is the figure that contains the plot data is to be gathered from
  • dataset will be an IXTdataset_2d object.
  • Property-value pairs are used to over-ride information from the plot, for instance a title or axes label may be given to use instead of the current plot title and axes labels
  • By default the currently selected plot is used


Other Information

The following commands can be used to get other information about the currently open plots

>> [names, tags] = get_all_name_tags
>> [figures, axes, plots, other] = get_all_handles(ident)
>> [figures, axes, plots, other] = get_all_handles
>> handle = get_handle(name, tag)
>> result = check_figure(handle, name, tag)
  • get_all_name_tags returns all the names and tags of currently open plots. Both names and tags will be cell arrays of strings
  • get_all_handles gets the handes (figure, axes, plots and other) of either all currently open plots or all objects (parents and children) relating to ident. i.e. if an axes handle is given for ident then figures will be the parent figure, axes will be ident, plots will be the plots contained within the axes and other will be any buttons etc. contained within the figure. Returns ALL handles regardless of a figure being held.
  • get_handle returns the handle of the currently open figure(s) that have the given name and tag and are not HELD.
  • check_figure checks that the given handle, name and tag match. It could be used by an application built on top of Libisis to check that a particular figure handle is part of that application (which has a system for naming and tagging all the plots it makes) and not another. return is the handle if the figure does have the name and tag or false if not.


Setting Default Properties

Default properties can be set using the following commands.

>> reset_default
>> reset_all
>> set_user_preferences('property', value, 'property', value,...)
>> set_default_property(name, tag, 'property', value, 'property', value, ...)
  • reset_default sets the properties of the current plot type to the global default properties
    • All future plots made to the name and tag of the current plot will have the global default properties
    • This does NOT effect the properties of plots with other names and tags
  • reset_all sets ALL properties to the global default properties
    • All future plots will have the global default properties
  • set_default_property sets properties for a particular plot type given by the name and tag.
    • All future plots made to the name and tag given will have the properties set here
    • If colour, markers or line properties are set, then this will over-ride anything previously set using [[Pre-Emptive Formatting| acolor, aline or amark].
    • This does NOT effect the properties of plots with other names and tags
  • set_user_preferences sets the global default properties. When a new plot is made, unless specific properties have been set for that name and tag then it will use the global default properties
    • Should be set at the start of a session or application
    • Standard defaults are used for any properties not set

Showing how global and local default properties are related

Undo Last Plot

Add a Color_Slider

Alias