ParaMonte MATLAB 3.0.0
Parallel Monte Carlo and Machine Learning Library
See the latest version documentation.
getAxes.m File Reference

Go to the source code of this file.

Functions

function getAxes (in varargin)
 Create axes in the specified input tiled position and return its handle.
More...
 

Function Documentation

◆ getAxes()

function getAxes ( in  varargin)

Create axes in the specified input tiled position and return its handle.

Parameters
[in]varargin: Any attributes of the axes, which can be one of the following positional arguments:
  1. rows : The input scalar MATLAB whole number, representing the number of rows of subplots in the figure.
  2. cols : The input scalar MATLAB whole number, representing the number of columns of subplots in the figure.
  3. cellx : The input scalar MATLAB whole number, representing the row at which the new axes must be placed in the figure.
  4. celly : The input scalar MATLAB whole number, representing the column at which the new axes must be placed in the figure.
  5. spanx : The input scalar MATLAB whole number in the range [0, 1], representing the X-span of the current axes in the figure.
  6. spany : The input scalar MATLAB whole number in the range [0, 1], representing the Y-span of the current axes in the figure.
or specified as pairs of scalar char, followed by the specifications value in the range [0, 1].
The following attributes are acceptable:
  1. 'Spacing' , also 's'
  2. 'SpacingHoriz' , also 'sh'
  3. 'SpacingVert' , also 'sv'
  4. 'Padding' , also 'p'
  5. 'PaddingRight' , also 'pr'
  6. 'PaddingLeft' , also 'pl'
  7. 'PaddingTop' , also 'pt'
  8. 'PaddingBottom' , also 'pb'
  9. 'Margin' , also 'm'
  10. 'MarginRight' , also 'mr'
  11. 'MarginLeft' , also 'ml'
  12. 'MarginTop' , also 'mt'
  13. 'MarginBottom' , also 'mb'
  14. 'Holdaxis' , also 'h' : If true, any axes below the current will not be deleted.
(optional. If missing, a fedault value will be used.)


Possible calling interfaces

h = getAxes(rows, cols, cellno, varargin)
h = getAxes(rows, cols, cellx, celly, varargin)
h = getAxes(rows, cols, cellx, celly, spanx, spany, varargin)
function getAxes(in varargin)
Create axes in the specified input tiled position and return its handle.


Example usage

1cd(fileparts(mfilename('fullpath'))); % Change working directory to source code directory.
2addpath('../../../../'); % Add the ParaMonte library root directory to the search path.
3
4pm.matlab.show()
5pm.matlab.show("figure('color', 'white');")
6 figure('color', 'white');
7pm.matlab.show("pm.vis.axes.getAxes(2, 1, 1, 'sv', 0, 'mr', 0); imagesc(magic(3));")
8 pm.vis.axes.getAxes(2, 1, 1, 'sv', 0, 'mr', 0); imagesc(magic(3));
9pm.matlab.show("pm.vis.axes.getAxes(2, 'pt', .02); imagesc(magic(4));")
10 pm.vis.axes.getAxes(2, 'pt', .02); imagesc(magic(4));
11pm.matlab.show("pm.vis.figure.savefig('getAxes.png', '-m4');")
12 pm.vis.figure.savefig('getAxes.png', '-m4');
function root()
Return a scalar MATLAB string containing the root directory of the ParaMonte library package.

Visualization of the example output


Final Remarks


If you believe this algorithm or its documentation can be improved, we appreciate your contribution and help to edit this page's documentation and source file on GitHub.
For details on the naming abbreviations, see this page.
For details on the naming conventions, see this page.
This software is distributed under the MIT license with additional terms outlined below.

  1. If you use any parts or concepts from this library to any extent, please acknowledge the usage by citing the relevant publications of the ParaMonte library.
  2. If you regenerate any parts/ideas from this library in a programming environment other than those currently supported by this ParaMonte library (i.e., other than C, C++, Fortran, MATLAB, Python, R), please also ask the end users to cite this original ParaMonte library.

This software is available to the public under a highly permissive license.
Help us justify its continued development and maintenance by acknowledging its benefit to society, distributing it, and contributing to it.

This code builds upon the works of 2001-2014 / Aslak Grinsted.

Author:
Fatemeh Bagheri, May 20 2024, 1:25 PM, NASA Goddard Space Flight Center (GSFC), Washington, D.C.
Amir Shahmoradi, May 16 2016, 9:03 AM, Oden Institute for Computational Engineering and Sciences (ICES), UT Austin