ParaMonte MATLAB 3.0.0
Parallel Monte Carlo and Machine Learning Library
See the latest version documentation.
cold.m
Go to the documentation of this file.
1%> \brief
2%> Return a black-blue-cyan-white colormap matrix
3%> of shape ``(nell, 3)`` containing a **cold** colormap.<br>
4%>
5%> \param[in] nell : The input scalar MATLAB integer representing
6%> the number of elements (rows) of the output colormap matrix.<br>
7%> (**optional**, default = ``size(get(gcf, 'colormap'), 1)``)
8%>
9%> \return
10%> ``cmap`` : The output black-blue-cyan-white colormap matrix
11%> of shape ``[nell, 3]`` containing a **cold** colormap.<br>
12%>
13%> \interface{cold}
14%> \code{.m}
15%>
16%> cmap = pm.vis.cmap.cold()
17%> cmap = pm.vis.cmap.cold([])
18%> cmap = pm.vis.cmap.cold(nell)
19%>
20%> \endcode
21%>
22%> \see
23%> MATLAB intrinsic functions ``hot()``, ``cool()``, ``jet()``, ``hsv()``, ``gray()``, ``copper()``, ``bone()``, ``vivid()``.<br>
24%>
25%> \example{cold}
26%> \include{lineno} example/vis/cmap/cold/main.m
27%> \vis{cold}
28%> \image html example/vis/cmap/cold/cold.1.png width=700
29%> \image html example/vis/cmap/cold/cold.2.png width=700
30%>
31%> \final{cold}
32%>
33%> Author: Joseph Kirk
34%> Email: jdkirk630@gmail.com
35%> Release: 1.0
36%> Date: 04/21/09
37%>
38%> Copyright (c) 2009, Joseph Kirk
39%> All rights reserved.
40%>
41%> Redistribution and use in source and binary forms, with or without
42%> modification, are permitted provided that the following conditions are
43%> met:
44%>
45%> * Redistributions of source code must retain the above copyright
46%> notice, this list of conditions and the following disclaimer.
47%> * Redistributions in binary form must reproduce the above copyright
48%> notice, this list of conditions and the following disclaimer in
49%> the documentation and/or other materials provided with the distribution
50%>
51%> This software is provided by the copyright holders and contributors "as is"
52%> and any express or implied warranties, including, but not limited to, the
53%> implied warranties of merchantability and fitness for a particular purpose
54%> are disclaimed. in no event shall the copyright owner or contributors be
55%> liable for any direct, indirect, incidental, special, exemplary, or
56%> consequential damages (including, but not limited to, procurement of
57%> substitute goods or services; loss of use, data, or profits; or business
58%> interruption) however caused and on any theory of liability, whether in
59%> contract, strict liability, or tort (including negligence or otherwise)
60%> arising in any way out of the use of this software, even if advised of the
61%> possibility of such damage.
62%>
63%> \author
64%> \JoshuaOsborne, May 21 2024, 7:42 AM, University of Texas at Arlington<br>
65%> \FatemehBagheri, May 20 2024, 1:25 PM, NASA Goddard Space Flight Center (GSFC), Washington, D.C.<br>
66%> \AmirShahmoradi, May 16 2016, 9:03 AM, Oden Institute for Computational Engineering and Sciences (ICES), UT Austin<br>
67function cmap = cold(nell)
68 if nargin < 1
69 nell = [];
70 end
71 if isempty(nell)
72 nell = size(get(gcf, 'colormap'), 1);
73 end
74 n = fix(3 / 8 * nell);
75 r = [zeros(2 * n, 1); (1 : nell - 2 * n)' / (nell - 2 * n)];
76 g = [zeros(n, 1); (1 : n)' / n; ones(nell - 2 * n, 1)];
77 b = [(1 : n)' / n; ones(nell - n, 1)];
78 cmap = [r, g, b];
79end
function list()
Return a list of MATLAB strings containing the names of OS platforms supported by the ParaMonte MATLA...
function cold(in nell)
Return a black-blue-cyan-white colormap matrix of shape (nell, 3) containing a cold colormap.