Other Commands

Jump to: navigation, search

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 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

The following diagram explains how the global default properties and default properties work.

Showing how global and local default properties are related

Undo Last Plot

To remove the last plot made in a one dimensional plot use the command


Add a Color_Slider

A color slider is a set of slider bars on the side of a two dimensional plot that is used to adjust the colour axis. The bottom slider adjusts the lower colour limit and the top slider the upper colour limit. It is originally intended for area plots to adjust the intensity axis (i.e colour axis).

>> color_slider(figureH)
  • figureH is the handle of the figure where the color slider is required
  • Color sliders will be added to the right hand side of the figure

The user will see:

color sliders added to the area plot


This is used to create a new function name by copying an old function. The old function name will remain in use as well.

>>alias('function old', 'function new', 'comments to add')

The 'comments to add' will be added to the gtkhelp file (accessed by typing 'gtk help' in the Matlab prompt. The new function simply calls the old function.


>> alias('ds,'surface_plot','longer name for surface plot')

now a surface plot could be performed by using ds or surface_plot with the same syntax.