ParaMonte MATLAB 3.0.0
Parallel Monte Carlo and Machine Learning Library
See the latest version documentation.
SubplotHeatmap Class Reference

This is the SubplotHeatmap class for generating instances of 2-dimensional Heatmap Subplot visualizations based on the relevant MATLAB intrinsic functions.
More...

Inheritance diagram for SubplotHeatmap:
Collaboration diagram for SubplotHeatmap:

Public Member Functions

function SubplotHeatmap (in dfref, in varargin)
 Construct and return an object of class pm.vis.SubplotHeatmap.
More...
 
function setColorLim (in self, in lb, in ub)
 Reset the heatmap colormap limits to the user-specified limits lb and ub.
If either is empty or missing, keep the existing limit for the corresponding empty limit.
If both are empty or missing, symmetrize the existing limits.
The specified input values will be used to set the ColorLimits component of the Heatmap object as ColorLimits = [lb, ub].
If both input values are missing, the current colormap range of the Heatmap subplots will be symmetrized.
More...
 

Detailed Description

This is the SubplotHeatmap class for generating instances of 2-dimensional Heatmap Subplot visualizations based on the relevant MATLAB intrinsic functions.

Note
See the documentation of the constructor of the class pm.vis.SubplotHeatmap for example usage.
See also
pm.vis.Cascade
pm.vis.Subplot
pm.vis.Triplex
pm.vis.Figure
pm.vis.Plot
pm.vis.Tile


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.

Author:
Joshua Alexander Osborne, May 21 2024, 6:05 PM, University of Texas at Arlington
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

Definition at line 25 of file SubplotHeatmap.m.

Constructor & Destructor Documentation

◆ SubplotHeatmap()

function SubplotHeatmap::SubplotHeatmap ( in  dfref,
in  varargin 
)

Construct and return an object of class pm.vis.SubplotHeatmap.

This is the constructor of the class pm.vis.SubplotHeatmap.

Parameters
[in]dfref: See the documentation of the corresponding input argument of the superclass pm.vis.Subplot.
[in]varargin: Any property, value pair of the parent object.
If the property is a struct(), then its value must be given as a cell array, with consecutive elements representing the struct property-name, property-value pairs.
Note that all of these property-value pairs can be also directly set via the parent object attributes, before calling the make() method.
Returns
self : The output object of class pm.vis.SubplotHeatmap.


Possible calling interfaces

s = pm.vis.SubplotHeatmap(dfref);
s = pm.vis.SubplotHeatmap(dfref, varargin);
Note
See also the documentation of the attributes of the superclass pm.vis.Subplot.


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
4theta = linspace(0, 8 * pi, 500);
5r = 1.5 * theta;
6df = array2table(ctranspose([r .* cos(theta); r .* sin(theta); r(end) - r]));
7df.Properties.VariableNames = ["X = r cos(theta)", "Y = r sin(theta)", "Z = r"];
8
9figure("color", "white");
10dfcor = pm.stats.Cor(df(:, 1 : 2));
11sv = pm.vis.SubplotHeatmap(dfcor.val);
12sv.title.titletext = "Heatmap Subplot";
13sv.make();
14sv.setColorLim();
15pm.vis.figure.savefig("SubplotHeatmap.1.png", "-m3");
16
17close all;
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.

Author:
Joshua Alexander Osborne, May 21 2024, 6:05 PM, University of Texas at Arlington
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

Member Function Documentation

◆ setColorLim()

function SubplotHeatmap::setColorLim ( in  self,
in  lb,
in  ub 
)

Reset the heatmap colormap limits to the user-specified limits lb and ub.
If either is empty or missing, keep the existing limit for the corresponding empty limit.
If both are empty or missing, symmetrize the existing limits.
The specified input values will be used to set the ColorLimits component of the Heatmap object as ColorLimits = [lb, ub].
If both input values are missing, the current colormap range of the Heatmap subplots will be symmetrized.

Warning
This method has side-effects by manipulating the existing attributes of the parent object.
Parameters
[in]self: The implicitly-passed input argument representing the parent object of the method.
[in]lb: The input MATLAB object that can be either:
  1. a scalar of type double representing the lower bound of the Heatmap colormap range.
  2. a vector of type double of size 2 representing the lower and upper bounds of the Heatmap colormap range.
(optional. If missing, the current value will remain intact.)
[in]ub: The input MATLAB scalar double representing the upper bound of the Heatmap colormap limits.
Its value is completely ignored if the input lb argument is a vector of size 2.
(optional. If missing, the current value will remain intact.)


Possible calling interfaces

h = pm.vis.Subplot.make();
h = pm.vis.Subplot.make([]);
h = pm.vis.Subplot.make([], []);
h = pm.vis.Subplot.make(lb, []);
h = pm.vis.Subplot.make([], ub);
h = pm.vis.Subplot.make(lb, ub);


Example usage

h = pm.vis.SubplotHeatmap(dfref);
h.make()
h.setColorLim() % symmetrize the current range.
h.setColorLim(1) % set the lower bound to 1.
h.setColorLim([], 1) % set the upper bound to 1.
h.setColorLim(1, 2) % set the lower and upper bounds to 1 and 2.
h.setColorLim([1, 2]) % set the lower and upper bounds to 1 and 2.


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
4theta = linspace(0, 8 * pi, 500);
5r = 1.5 * theta;
6df = array2table(ctranspose([r .* cos(theta); r .* sin(theta); r(end) - r]));
7df.Properties.VariableNames = ["X = r cos(theta)", "Y = r sin(theta)", "Z = r"];
8
9figure("color", "white");
10dfcor = pm.stats.Cor(df(:, 1 : 2));
11sv = pm.vis.SubplotHeatmap(dfcor.val);
12sv.title.titletext = "Heatmap Subplot";
13sv.make();
14sv.setColorLim();
15pm.vis.figure.savefig("SubplotHeatmap.1.png", "-m3");
16
17close all;

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.

Author:
Joshua Alexander Osborne, May 21 2024, 5:54 PM, University of Texas at Arlington
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

The documentation for this class was generated from the following file: