ParaMonte MATLAB 3.0.0
Parallel Monte Carlo and Machine Learning Library
See the latest version documentation.
Subplot.m
Go to the documentation of this file.
1%> \brief
2%> This is the abstract class for generating instances of axes
3%> with various types of plots from one or more columns of data.<br>
4%>
5%> \details
6%> While it can be directly used for visualization tasks,
7%> this class primarily serves as the superclass for the
8%> visualization subclasses accessible to the end users.<br>
9%>
10%> \note
11%> In case of [pm.vis.SubplotContour](@ref SubplotContour), [pm.vis.SubplotContour3](@ref SubplotContour3), and
12%> [pm.vis.SubplotContourf](@ref SubplotContourf) visualization objects, the density of the input data
13%> is first computed and smoothed by a Gaussian kernel density estimator and then passed to the
14%> MATLAB intrinsic plotting functions ``contour``, ``contourf``, ``contour3``.<br>
15%>
16%> Dynamic class attributes
17%> ------------------------
18%>
19%> This class contains a set of attributes that are defined dynamically at runtime
20%> for the output object depending on its subclass (plot type it represents).<br>
21%> The following is the list of all class attributes that are dynamically added
22%> to the instantiated class objects based on the specified input plot type.<br>
23%> See also the explicit class and superclass attributes not listed below.<br>
24%>
25%> <ol>
26%> <li> ``colx`` (standing for x-columns; available for all axes types)<br>
27%>
28%> Optional property that determines the columns of
29%> the specified dataframe to serve as the x-values.
30%> It can have multiple forms:<br>
31%> <ol>
32%> <li> a numeric or cell array of column indices in the input ``dfref``.
33%> <li> a string or cell array of column names in ``dfref.Properties.VariableNames``.
34%> <li> a cell array of a mix of the above two.
35%> <li> a numeric range.
36%> </ol>
37%> If ``colx`` is empty,<br>
38%> <ol>
39%> <li> it will be set to the row indices of ``dfref`` for line/scatter axes types.
40%> <li> it will be set to all columns of ``dfref`` for density axes types.
41%> </ol>
42%>
43%> \warning
44%> In all cases, ``colx`` must have a length that is either
45%> 0 (empty), 1, or equal to the length of ``coly`` or ``colz``.<br>
46%> If the length is 1, then ``colx`` will be plotted against
47%> data corresponding to each element of ``coly`` and ``colz``.<br>
48%>
49%> \example{colx}
50%> \code{.m}
51%>
52%> Subplot.colx = [7, 8, 9]
53%> Subplot.colx = ["sampleLogFunc", "sampleVariable1"]
54%> Subplot.colx = {"sampleLogFunc", 9, "sampleVariable1"}
55%> Subplot.colx = 7:9 # every column in the data frame starting from column #7 to #9
56%> Subplot.colx = 7:2:20 # every other column in the data frame starting from column #7 to #20
57%>
58%> \endcode
59%> <br>
60%>
61%> <li> ``coly`` (standing for y-columns; available for all axes types except
62%> [pm.vis.SubplotHeatmap](@ref SubplotHeatmap), [pm.vis.SubplotHistogram](@ref SubplotHistogram), [pm.vis.SubplotHistfit](@ref SubplotHistfit))<br>
63%>
64%> Optional property that determines the columns of
65%> the specified dataframe to serve as the z-values.<br>
66%> It can have multiple forms:<br>
67%> <ol>
68%> <li> a numeric or cell array of column indices in the input ``dfref``.
69%> <li> a string or cell array of column names in ``dfref.Properties.VariableNames``.
70%> <li> a cell array of a mix of the above two.
71%> <li> a numeric range.
72%> </ol>
73%> If ``coly`` is empty,<br>
74%> <ol>
75%> <li> it will be set to the row indices of ``dfref`` for line/scatter axes types.
76%> <li> it will be set to all columns of ``dfref`` for density axes types.
77%> </ol>
78%>
79%> \warning
80%> In all cases, ``coly`` must have a length that is either
81%> 0 (empty), 1, or equal to the length of ``colx`` or ``colz``.<br>
82%> If the length is 1, then ``coly`` will be plotted against
83%> data corresponding to each element of ``colx`` and ``colz``.<br>
84%>
85%> \example{coly}
86%> \code{.m}
87%>
88%> Subplot.coly = [7, 8, 9]
89%> Subplot.coly = ["sampleLogFunc", "sampleVariable1"]
90%> Subplot.coly = {"sampleLogFunc", 9, "sampleVariable1"}
91%> Subplot.coly = 7:9 # every column in the data frame starting from column #7 to #9
92%> Subplot.coly = 7:2:20 # every other column in the data frame starting from column #7 to #20
93%>
94%> \endcode
95%> <br>
96%>
97%> <li> ``colz`` (standing for z-columns; available only for 3D plots, e.g.,
98%> [pm.vis.SubplotLine3](@ref SubplotLine3), [pm.vis.SubplotScatter3](@ref SubplotScatter3),
99%> [pm.vis.SubplotLineScatter3](@ref SubplotLineScatter3))<br>
100%>
101%> Optional property that determines the columns of
102%> the specified dataframe to serve as the z-values.<br>
103%> It can have multiple forms:<br>
104%> <ol>
105%> <li> a numeric or cell array of column indices in the input ``dfref``.
106%> <li> a string or cell array of column names in ``dfref.Properties.VariableNames``.
107%> <li> a cell array of a mix of the above two.
108%> <li> a numeric range.
109%> </ol>
110%> If ``colz`` is empty,<br>
111%> <ol>
112%> <li> it will be set to the row indices of ``dfref`` for line/scatter axes types.
113%> <li> it will be set to all columns of ``dfref`` for density axes types.
114%> </ol>
115%>
116%> \warning
117%> In all cases, ``colz`` must have a length that is either
118%> 0 (empty), 1, or equal to the length of ``colx`` or ``coly``.<br>
119%> If the length is 1, then ``colz`` will be plotted against
120%> data corresponding to each element of ``colx`` and ``coly``.<br>
121%>
122%> \example{colz}
123%> \code{.m}
124%>
125%> Subplot.colz = [7, 8, 9]
126%> Subplot.colz = ["sampleLogFunc", "sampleVariable1"]
127%> Subplot.colz = {"sampleLogFunc", 9, "sampleVariable1"}
128%> Subplot.colz = 7:9 % every column in the data frame starting from column #7 to #9
129%> Subplot.colz = 7:2:20 % every other column in the data frame starting from column #7 to #20
130%>
131%> \endcode
132%> <br>
133%>
134%> <li> ``colc`` (standing for color-columns; available only for 2D/3D line/scatter axes types, e.g.,
135%> [pm.vis.SubplotLine3](@ref SubplotLine3), [pm.vis.SubplotScatter3](@ref SubplotScatter3),
136%> [pm.vis.SubplotLineScatter3](@ref SubplotLineScatter3), [pm.vis.SubplotLine](@ref SubplotLine),
137%> [pm.vis.SubplotScatter](@ref SubplotScatter), [pm.vis.SubplotLineScatter](@ref SubplotLineScatter))<br>
138%>
139%> Optional property that determines the columns of the input ``dfref`` to
140%> use as the color mapping values for each line/point element in the plot.<br>
141%> It can have multiple forms:<br>
142%> <ol>
143%> <li> a numeric or cell array of column indices in the input ``dfref``.
144%> <li> a string or cell array of column names in ``dfref.Properties.VariableNames``.
145%> <li> a cell array of a mix of the above two.
146%> <li> a numeric range.
147%> </ol>
148%> The default value is the indices of the rows of the input ``dfref``.<br>
149%> \example{colc}
150%> \code{.m}
151%>
152%> Subplot.colc = [7,8,9]
153%> Subplot.colc = ["sampleLogFunc", "sampleVariable1"]
154%> Subplot.colc = {"sampleLogFunc", 9, "sampleVariable1"}
155%> Subplot.colc = 7:9 # every column in the data frame starting from column #7 to #9
156%> Subplot.colc = 7:2:20 # every other column in the data frame starting from column #7 to #20
157%>
158%> \endcode
159%> <br>
160%> </ol>
161%>
162%> \note
163%> For example usage, see the documentation of the constructor of
164%> the class [pm.vis.Subplot::Subplot](@ref Subplot::Subplot).<br>
165%>
166%> \devnote
167%> While dynamic addition of class attributes is not ideal, the current
168%> design was deemed unavoidable and best, given the constraints of the
169%> MATLAB language and visualization tools.<br>
170%>
171%> \see
172%> [pm.vis](@ref \psldir/main/+pm/+vis)<br>
173%> [pm.vis.axes.Axes](@ref Axes)<br>
174%> [pm.matlab.Handle](@ref Handle)<br>
175%> [pm.vis.Cascade](@ref Cascade)<br>
176%> [pm.vis.Subplot](@ref Subplot)<br>
177%> [pm.vis.Triplex](@ref Triplex)<br>
178%> [pm.vis.Figure](@ref Figure)<br>
179%> [pm.vis.Plot](@ref Plot)<br>
180%> [pm.vis.Tile](@ref Tile)<br>
181%>
182%> \final
183%>
184%> \author
185%> \FatemehBagheri, May 20 2024, 1:25 PM, NASA Goddard Space Flight Center (GSFC), Washington, D.C.<br>
186%> \AmirShahmoradi, May 16 2016, 9:03 AM, Oden Institute for Computational Engineering and Sciences (ICES), UT Austin<br>
187classdef Subplot < pm.vis.axes.Axes
188
189 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
190
191 properties(Access = public)
192 %>
193 %> ``dfref``
194 %>
195 %> A scalar object of class [pm.container.DataFrame](@ref DataFrame)
196 %> containing (a reference to) the user-specified data to visualize.<br>
197 %>
198 dfref = [];
199 %>
200 %> ``fout``
201 %>
202 %> A MATLAB ``struct`` whose fields are the outputs of
203 %> various plotting tools used to make the current axis.<br>
204 %>
205 fout = struct();
206 %>
207 %> ``rows``
208 %>
209 %> A numeric vector that serves as a storage for an arbitrary subset of indices
210 %> of the rows of the input dataframe reference ``dfref`` to the class constructor .<br>
211 %> It can be either:<br>
212 %> <ol>
213 %> <li> a numeric range, or,
214 %> <li> a list of row indices of the ``dfref``.
215 %> </ol>
216 %>
217 %> \example{rows}
218 %> \code{fout}
219 %>
220 %> s = pm.vis.Subplot();
221 %>
222 %> s.rows = 15 : -2 : 8;
223 %> s.rows = [12, 46, 7, 8, 9, 4, 7, 163];
224 %>
225 %> \endcode
226 %>
227 %> \warning
228 %> If ``rows`` is empty, the default will be all rows of the ``dfref``.<br>
229 %>
230 %> \note
231 %> The [pm.container.DataFrame.rowslog()](@ref DataFrame::rowslog) method of
232 %> this class can be used to generate logarithmically-spaced
233 %> row indices of the target dataframe.<br>
234 %>
235 rows = [];
236 end
237
238 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
239
240 methods(Access = public)
241
242 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
243
244 %> \brief
245 %> Construct and return an object of class [pm.vis.Subplot](@ref Subplot).<br>
246 %>
247 %> \details
248 %> This is the custom constructor of the class [pm.vis.Subplot](@ref Subplot).<br>
249 %>
250 %> \param[in] ptype : See the documentation of the corresponding input argument of the
251 %> superclass constructor [pm.vis.axes.Axes::Axes](@ref Axes::Axes).<br>
252 %> \param[in] dfref : The input MATLAB matrix or table containing the data to plot or
253 %> a function handle that returns such a MATLAB matrix or table.<br>
254 %> Specifying a function handle is superior to specifying the
255 %> data directly, because the function handle will always use
256 %> the most updated version of the user table or matrix.<br>
257 %> (**optional**. The default is an empty table.)
258 %> \param[in] varargin : Any ``property, value`` pair of the parent object.<br>
259 %> If the property is a ``struct()``, then its value must be given as a cell array,
260 %> with consecutive elements representing the struct ``property-name, property-value`` pairs.<br>
261 %> Note that all of these property-value pairs can be also directly set via the
262 %> parent object attributes, before calling the ``make()`` method.<br>
263 %> The input ``varargin`` can also contain the components
264 %> of the ``subplot`` component of the parent object.<br>
265 %>
266 %> \return
267 %> ``self`` : The output scalar object of class [pm.vis.Subplot](@ref Subplot).<br>
268 %>
269 %> \interface{Subplot}
270 %> \code{.m}
271 %>
272 %> s = pm.vis.Subplot(ptype, dfref);
273 %> s = pm.vis.Subplot(ptype, dfref, varargin);
274 %>
275 %> \endcode
276 %>
277 %> \warning
278 %> In all cases, ``colc`` must have a length that is either
279 %> 0, or 1, or equal to the maximum lengths of ``(colx, coly, colz)``.<br>
280 %> If the length is 1, then all data will be plotted with the same color
281 %> mapping determined by values specified by the elements of ``colc``.<br>
282 %> If it is an empty object having length 0, then the default value will be used.<br>
283 %>
284 %> \note
285 %> In case of [pm.vis.SubplotContour](@ref SubplotContour)/[pm.vis.SubplotContourf](@ref SubplotContourf)/[pm.vis.SubplotContour3](@ref SubplotContour3)
286 %> visualization objects, the density of the input data is first computed and smoothed
287 %> by a Gaussian kernel density estimator and then passed to the MATLAB intrinsic
288 %> plotting functions , ``contour``, ``contourf``, ``contour3``.<br>
289 %>
290 %> \example{Subplot}
291 %> \include{lineno} example/vis/Subplot/main.m
292 %> \vis{Subplot}
293 %> <br>\image html example/vis/Subplot/SubplotLine.1.png width=700
294 %> <br>\image html example/vis/Subplot/SubplotLine3.1.png width=700
295 %> <br>\image html example/vis/Subplot/SubplotScatter.1.png width=700
296 %> <br>\image html example/vis/Subplot/SubplotScatter3.1.png width=700
297 %> <br>\image html example/vis/Subplot/SubplotLineScatter.1.png width=700
298 %> <br>\image html example/vis/Subplot/SubplotLineScatter3.1.png width=700
299 %> <br>\image html example/vis/Subplot/SubplotHistfit.1.png width=700
300 %> <br>\image html example/vis/Subplot/SubplotHistogram.1.png width=700
301 %> <br>\image html example/vis/Subplot/SubplotHistogram2.1.png width=700
302 %> <br>\image html example/vis/Subplot/SubplotContour.1.png width=700
303 %> <br>\image html example/vis/Subplot/SubplotContourf.1.png width=700
304 %> <br>\image html example/vis/Subplot/SubplotContour3.1.png width=700
305 %> <br>\image html example/vis/Subplot/SubplotHeatmap.1.png width=700
306 %> <br>\image html example/vis/Subplot/SubplotEllipse3.1.png width=700
307 %> <br>\image html example/vis/Subplot/SubplotEllipse.1.png width=700
308 %>
309 %> \final{Subplot}
310 %>
311 %> \author
312 %> \JoshuaOsborne, May 22 2024, 6:45 PM, University of Texas at Arlington<br>
313 %> \AmirShahmoradi, July 5 2024, 1:07 PM, NASA Goddard Space Flight Center (GSFC), Washington, D.C.<br>
314 function self = Subplot(ptype, dfref, varargin)
315 if nargin < 2
316 dfref = [];
317 end
318 if nargin < 1
319 ptype = [];
320 end
321 self@pm.vis.axes.Axes(ptype, varargin{:});
322 self.dfref = pm.container.DataFrame(dfref);
323 end
324
325 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
326
327 %> \brief
328 %> Generate a plot from the selected columns
329 %> of the parent object component ``dfref``.<br>
330 %>
331 %> \param[inout] self : The input/output parent object of class [pm.vis.Subplot](@ref Subplot)
332 %> which is **implicitly** passed to this dynamic method (not by the user).<br>
333 %> \param[in] varargin : Any ``property, value`` pair of the parent object.<br>
334 %> If the property is a ``struct()``, then its value must be given as a cell array,
335 %> with consecutive elements representing the struct ``property-name, property-value`` pairs.<br>
336 %> Note that all of these property-value pairs can be also directly set via the
337 %> parent object attributes, before calling the ``make()`` method.<br>
338 %>
339 %> \interface{make}
340 %> \code{.m}
341 %>
342 %> s = pm.vis.Subplot(ptype, dfref)
343 %>
344 %> s.make(varargin);
345 %> s.make();
346 %>
347 %> \endcode
348 %>
349 %> \warning
350 %> This method has side-effects by manipulating
351 %> the existing attributes of the parent object.<br>
352 %>
353 %> \example{make}
354 %> \code{.m}
355 %>
356 %> dfref = rand(1000, 3);
357 %> s = pm.vis.Subplot("scatter", dfref);
358 %> s.make("colx", 1, "coly", 2, "colc", 3)
359 %>
360 %> \endcode
361 %>
362 %> \example{Subplot}
363 %> \include{lineno} example/vis/Subplot/main.m
364 %> \vis{Subplot}
365 %> <br>\image html example/vis/Subplot/SubplotLine.1.png width=700
366 %> <br>\image html example/vis/Subplot/SubplotLine3.1.png width=700
367 %> <br>\image html example/vis/Subplot/SubplotScatter.1.png width=700
368 %> <br>\image html example/vis/Subplot/SubplotScatter3.1.png width=700
369 %> <br>\image html example/vis/Subplot/SubplotLineScatter.1.png width=700
370 %> <br>\image html example/vis/Subplot/SubplotLineScatter3.1.png width=700
371 %> <br>\image html example/vis/Subplot/SubplotHistfit.1.png width=700
372 %> <br>\image html example/vis/Subplot/SubplotHistogram.1.png width=700
373 %> <br>\image html example/vis/Subplot/SubplotHistogram2.1.png width=700
374 %> <br>\image html example/vis/Subplot/SubplotContour.1.png width=700
375 %> <br>\image html example/vis/Subplot/SubplotContourf.1.png width=700
376 %> <br>\image html example/vis/Subplot/SubplotContour3.1.png width=700
377 %> <br>\image html example/vis/Subplot/SubplotHeatmap.1.png width=700
378 %> <br>\image html example/vis/Subplot/SubplotEllipse3.1.png width=700
379 %> <br>\image html example/vis/Subplot/SubplotEllipse.1.png width=700
380 %>
381 %> \final{make}
382 %>
383 %> \author
384 %> \JoshuaOsborne, May 22 2024, 6:36 PM, University of Texas at Arlington<br>
385 %> \FatemehBagheri, May 20 2024, 1:25 PM, NASA Goddard Space Flight Center (GSFC), Washington, D.C.<br>
386 %> \AmirShahmoradi, July 5 2024, 1:07 PM, NASA Goddard Space Flight Center (GSFC), Washington, D.C.<br>
387 function make(self, varargin)
388
389 self.premake(varargin{:});
390
391 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
392 %%%% RULE 0: No component of ``self`` is allowed to appear to the left of assignment operator, except ``fout``.
393 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
395 %%%% Set what to plot.
396
397 noPlotEnabled = false;
398 noPlotEnabled = noPlotEnabled || (self.type.is.scatter && ~self.scatter.enabled);
399 noPlotEnabled = noPlotEnabled || (self.type.is.scatter3 && ~self.scatter3.enabled);
400 noPlotEnabled = noPlotEnabled || (self.type.is.line && ~self.plot.enabled && ~self.surface.enabled);
401 noPlotEnabled = noPlotEnabled || (self.type.is.line3 && ~self.plot3.enabled && ~self.surface.enabled);
402 noPlotEnabled = noPlotEnabled || (self.type.is.lineScatter && ~self.plot.enabled && ~self.surface.enabled && ~self.scatter.enabled);
403 noPlotEnabled = noPlotEnabled || (self.type.is.lineScatter3 && ~self.plot3.enabled && ~self.surface.enabled && ~self.scatter3.enabled);
404 noPlotEnabled = noPlotEnabled || (self.type.is.histogram2 && ~self.histogram2.enabled);
405 noPlotEnabled = noPlotEnabled || (self.type.is.histogram && ~self.histogram.enabled);
406 noPlotEnabled = noPlotEnabled || (self.type.is.contourf && ~self.contourf.enabled);
407 noPlotEnabled = noPlotEnabled || (self.type.is.contour3 && ~self.contour3.enabled);
408 noPlotEnabled = noPlotEnabled || (self.type.is.histfit && ~self.histfit.enabled);
409 noPlotEnabled = noPlotEnabled || (self.type.is.contour && ~self.contour.enabled);
410 noPlotEnabled = noPlotEnabled || (self.type.is.heatmap && ~self.heatmap.enabled);
411 if noPlotEnabled
412 error ( newline ...
413 + "All plot types are deactivated by the user. There is nothing to display." + newline ...
414 + "Enable at least one the following plotting components of the parent object." + newline ...
415 + newline ...
416 );
417 end
418
419 dfcopy = self.dfref.copy();
420 if isempty(dfcopy)
421 help("pm.vis.Subplot");
422 error ( newline ...
423 + "There is no data to plot." + newline ...
424 + "Without any input data, visualizations are impossible." + newline ...
425 + "The input argument ``dfref`` to the object constructor was likely empty." + newline ...
426 + "If you merely want to create a template of visualization specifications," + newline ...
427 + "then use the class [pm.vis.axes.Axes](@ref Axes) which is the superclass of this class." + newline ...
428 + "For more information, see the class documentation displayed above." + newline ...
429 + newline ...
430 );
431 end
432
433 %%%%
434 %%%% check rows presence
435 %%%%
436
437 if pm.array.len(self.rows)
438 rowsindex = self.rows(:);
439 else
440 rowsindex = [1 : self.dfref.nrow()]';
441 end
442
443 %%%%%%%%%%%%%%%%%%%%%%%%%%%
444 %%%% check columns presence
445 %%%%%%%%%%%%%%%%%%%%%%%%%%%
446
447 coldatx = []; colindx = []; colnamx = [];
448 if isprop(self, "colx") && pm.array.len(self.colx)
449 [colindx, colnamx] = pm.str.locname(dfcopy.Properties.VariableNames, self.colx);
450 elseif self.type.is.heatmap || self.type.is.d1
451 colnamx = dfcopy.Properties.VariableNames;
452 colindx = 1 : length(colnamx);
453 else
454 coldatx = rowsindex;
455 colnamx = "Row Index";
456 end
457
458 coldaty = []; colindy = []; colnamy = [];
459 if isprop(self, "coly") && pm.array.len(self.coly)
460 [colindy, colnamy] = pm.str.locname(dfcopy.Properties.VariableNames, self.coly);
461 elseif self.type.is.density && ~self.type.is.histogram2
462 if isfield(self.(self.type.name), "normalization") && ~isempty(self.(self.type.name).normalization)
463 colnamy = string(self.(self.type.name).normalization);
464 elseif self.type.is.d1
465 colnamy = "Count";
466 else
467 colnamy = "Density";
468 end
469 elseif self.type.is.heatmap
470 if isempty(dfcopy.Properties.RowNames)
471 dfcopy.Properties.RowNames = string(rowsindex);
472 end
473 colnamy = dfcopy.Properties.RowNames;
474 else
475 coldaty = rowsindex;
476 colnamy = "Row Index";
477 end
478
479 coldatz = []; colindz = []; colnamz = [];
480 if isprop(self, "colz") && pm.array.len(self.colz)
481 [colindz, colnamz] = pm.str.locname(dfcopy.Properties.VariableNames, self.colz);
482 elseif self.type.has.line || self.type.has.scatter
483 if ~self.type.is.d3
484 % This is necessary for 2D surface plot.
485 coldatz = zeros(length(rowsindex), 1);
486 else
487 coldatz = rowsindex;
488 colnamz = "Row Index";
489 end
490 elseif self.type.is.density && self.type.is.triaxes
491 colnamz = "Density";
492 end
493
494 coldatc = []; colindc = []; colnamc = [];
495 if isprop(self, "colc") && pm.array.len(self.colc)
496 [colindc, colnamc] = pm.str.locname(dfcopy.Properties.VariableNames, self.colc);
497 elseif self.type.has.line || self.type.has.scatter
498 if ~isempty(colnamz) && ~(isempty(coldatz) && isempty(colindz))
499 coldatc = coldatz;
500 colindc = colindz;
501 colnamc = colnamz;
502 else
503 coldatc = rowsindex;
504 colnamc = "Row Index";
505 end
506 elseif self.type.is.density && ~self.type.is.d1
507 colnamc = "Density";
508 end
509
510 %%%% check the lengths are consistent.
511
512 colindlen = max([ length(colindc) ...
513 , length(colindz) ...
514 , length(colindy) ...
515 , length(colindx) ...
516 ]);
517
518 if length(colindc) ~= colindlen && 1 < length(colindc); error("length of colx must be either 1 or equal to the maximum of the lengths of coly, colz, colc."); end
519 if length(colindz) ~= colindlen && 1 < length(colindz); error("length of coly must be either 1 or equal to the maximum of the lengths of colx, colz, colc."); end
520 if length(colindy) ~= colindlen && 1 < length(colindy); error("length of colz must be either 1 or equal to the maximum of the lengths of colx, coly, colc."); end
521 if length(colindx) ~= colindlen && 1 < length(colindx); error("length of colc must be either 1 or equal to the maximum of the lengths of colx, coly, colz."); end
522
523 %%%% assign data in case of single column assignments.
524
525 if length(colindx) == 1; coldatx = dfcopy{rowsindex, colindx}; end
526 if length(colindy) == 1; coldaty = dfcopy{rowsindex, colindy}; end
527 if length(colindz) == 1; coldatz = dfcopy{rowsindex, colindz}; end
528 if length(colindc) == 1; coldatc = dfcopy{rowsindex, colindc}; end
529
530 %%%% get keyword arguments.
531
532 kws = struct();
533 for prop = [ "axes" ...
534 , "colorbar" ...
535 , "colormap" ...
536 , "contour" ...
537 , "contour3" ...
538 , "contourf" ...
539 , "legend" ...
540 , "heatmap" ...
541 , "histfit" ...
542 , "histogram" ...
543 , "histogram2" ...
544 , "plot" ...
545 , "plot3" ...
546 , "scatter" ...
547 , "scatter3" ...
548 , "surface" ...
549 , "title" ...
550 , "xlabel" ...
551 , "ylabel" ...
552 , "zlabel" ...
553 ]
554 if isprop(self, prop)
555 kws.(prop) = self.comp2hash(prop);
556 end
557 end
558
559 for prop = ["scatter", "scatter3"]
560 if isprop(self, prop) && self.(prop).filled
561 kws.(prop) = [{"filled"}; kws.(prop)(:)];
562 end
563 end
564
565 %%%% generate the kde2d density estimates for the contour plots.
566
567 kde2dUpdateNeeded = self.type.is.diffusion && (1 < length(colindx) || 1 < length(colindy));
568 if self.type.is.diffusion
569 kde2d = struct();
570 if ~kde2dUpdateNeeded
571 [kde2d.bandwidth, kde2d.density, kde2d.crdx, kde2d.crdy] = pm.stats.hist.kde2d([coldatx(:), coldaty(:)], self.resolution);
572 kde2d.density(kde2d.density < self.maxnoise) = NaN;
573 end
574 end
575
576 %%%% determine the multicolor nature of the plots.
577
578 isMultiColorPlot = false;
579 if ~self.cenabled && (self.type.has.scatter || self.type.is.diffusion)
580 if self.type.is.diffusion
581 prop = self.type.name;
582 elseif self.type.is.d2
583 prop = "scatter";
584 elseif self.type.is.d3
585 prop = "scatter3";
586 else
587 error("Internal error occurred. A line/scatter plot must be either 2D or 3D.");
588 end
589 if pm.array.len(self.(prop).color)
590 if all(size(self.(prop).color) == [colindlen, 3])
591 isMultiColorPlot = true;
592 multiColorList = self.(prop).color;
593 elseif all(size(self.(prop).color) == [1, 3]) || self.type.is.diffusion
594 coldatc = self.(prop).color;
595 else
596 error ( newline ...
597 + "The value specified for the 'color' property of the " + prop + " component" + newline ...
598 + "must be either an RGB triplet vector of size [1, 3], or a matrix of size [" + string(colindlen) + ", 3]" + newline ...
599 + "for the current set of variables that are selected to plot. " + newline ...
600 + "It can also be an empty object, in which case, the colors" + newline ...
601 + "of the objects in the plot will be chosen automatically." + newline ...
602 + newline ...
603 );
604 end
605 else
606 multiColorList = lines(colindlen);
607 isMultiColorPlot = true;
608 end
609 elseif self.type.is.diffusion && ~pm.array.len(self.(self.type.name).color)
610 coldatc = self.(self.type.name).color;
611 end
612
613 %%%% initiate the legend.
614
615 legendary = isprop(self, "legend") && self.legend.enabled;
616 if legendary
617 legempty = pm.array.len(self.legend.labels) == 0;
618 lglabels = strings(colindlen, 1);
619 icollgx = 1;
620 icollgy = 1;
621 icollgz = 1;
622 end
623
624 %%%% generate axes and set axes properties.
625
626 if isprop(self, "axes")
627 self.fout.axes = gca;
628 if self.axes.enabled
629 % This setting must happen here, before any
630 % individual axes component settings below.
631 set(gca, kws.axes{:});
632 end
633 if self.type.is.triaxes
634 view(3);
635 end
636 hold on;
637 end
638
639 %%%%
640 %%%% Ensure points and lines are scaled properly.
641 %%%% It is not clear whether it's worth doing so because
642 %%%% most figure resizing happen after making it,
643 %%%% which makes the following solution useless.
644 %%%%
645
646 % temp = [];
647 % if ~strcmpi(self.fout.axes.Units, "normalized")
648 % temp = self.fout.axes.Units;
649 % self.fout.axes.Units = "normalized";
650 % end
651 % defaultSizeFig = [560, 420] % width, height in pixels.
652 % defaultSizeAxes = [0.775, 0.815] % width, height in pixels (assuming no colorbar).
653 % self.fout.axes.Position
654 % if ~isempty(temp)
655 % self.fout.axes.Units = temp;
656 % end
657
658 %%%% Make plots.
659
660 if self.type.is.heatmap && self.heatmap.enabled
661
662 if ~isempty(self.precision)
663 self.fout.heatmap = heatmap(colnamx, colnamy, round(dfcopy{colnamy, colnamx}, self.precision), kws.heatmap{:});
664 else
665 self.fout.heatmap = heatmap(colnamx, colnamy, dfcopy{colnamy, colnamx}, kws.heatmap{:});
666 end
667
668 else
669
670 if ~self.type.has.line && ~self.type.has.scatter
671 % line/scatter plots must be taken care of separately.
672 self.fout.(self.type.name) = cell(colindlen, 1);
673 end
674
675 for icol = 1 : colindlen
676
677 %%%% set the data to plot.
678
679 if 1 < length(colindx); if legendary; icollgx = icol; end; coldatx = dfcopy{rowsindex, colindx(icol)}; end
680 if 1 < length(colindy); if legendary; icollgy = icol; end; coldaty = dfcopy{rowsindex, colindy(icol)}; end
681 if 1 < length(colindz); if legendary; icollgz = icol; end; coldatz = dfcopy{rowsindex, colindz(icol)}; end
682
683 if isMultiColorPlot
684 coldatc = multiColorList(icol, :);
685 elseif 1 < length(colindc)
686 coldatc = dfcopy{rowsindex, colindc(icol)};
687 end
688
689 if self.type.is.diffusion
690 if ~isempty(coldatc)
691 kws.(self.type.name) = pm.matlab.hashmap.repKeyVal("color", coldatc, kws.(self.type.name));
692 end
693 if kde2dUpdateNeeded
694 [kde2d.bandwidth, kde2d.density, kde2d.crdx, kde2d.crdy] = pm.stats.hist.kde2d([coldatx(:), coldaty(:)], self.resolution);
695 kde2d.density(kde2d.density < self.maxnoise) = NaN;
696 end
697 end
698
699 %%%% set the default legend.
700
701 if legendary && legempty
702 if 1 < length(colindz)
703 suffix = "-" + colnamz(icollgz);
704 else
705 suffix = "";
706 end
707 if length(colindx) < 2 && 1 < length(colindy)
708 lglabels(icol) = colnamy(icollgy) + suffix;
709 elseif 1 < length(colindx) && length(colindy) < 2
710 lglabels(icol) = colnamx(icollgx) + suffix;
711 else
712 lglabels(icol) = colnamx(icollgx) + "-" + colnamy(icollgy) + suffix;
713 end
714 end
715
716 %%%% add density plot.
717
718 if self.type.is.contour
719 self.fout.contour{icol} = struct();
720 [self.fout.contour{icol}.matrix, self.fout.contour{icol}.handle] = contour ( kde2d.crdx ...
721 , kde2d.crdy ...
722 , kde2d.density ...
723 , self.contour.levels ...
724 , kws.contour{:} ...
725 );
726 elseif self.type.is.contour3
727 self.fout.contour3{icol} = struct();
728 [self.fout.contour3{icol}.matrix, self.fout.contour3{icol}.handle]= contour3( kde2d.crdx...
729 , kde2d.crdy...
730 , kde2d.density...
731 , self.contour3.levels ...
732 , kws.contour3{:} ...
733 );
734 elseif self.type.is.contourf
735 self.fout.contourf{icol} = struct();
736 [self.fout.contourf{icol}.matrix, self.fout.contourf{icol}.handle]= contourf( kde2d.crdx ...
737 , kde2d.crdy ...
738 , kde2d.density ...
739 , self.contourf.levels ...
740 , kws.contourf{:} ...
741 );
742 elseif self.type.is.histfit
743 self.fout.histfit{icol} = histfit(coldatx, self.histfit.nbins, self.histfit.dist, kws.histfit{:});
744 self.fout.histfit{icol}(1).FaceAlpha = 0.6; % make histogram face transparent 60%
745 self.fout.histfit{icol}(1).EdgeAlpha = 0; % make histogram lines invisible
746 self.fout.histfit{icol}(2).Color = "black"; % make the fitted line black
747 elseif self.type.is.histogram
748 if ~isempty(self.histogram.nbins)
749 self.fout.histogram{icol} = histogram(coldatx, self.histogram.nbins, kws.histogram{:});
750 elseif ~isempty(self.histogram.edges)
751 self.fout.histogram{icol} = histogram(coldatx, self.histogram.edges, kws.histogram{:});
752 else
753 self.fout.histogram{icol} = histogram(coldatx, kws.histogram{:});
754 end
755 elseif self.type.is.histogram2
756 self.fout.histogram2{icol} = histogram2(coldatx, coldaty, kws.histogram2{:});
757 end
758
759 %%%% add line plot.
760
761 if self.type.has.line
762 if self.type.is.d2 && self.plot.enabled
763 self.fout.plot{icol} = plot ( coldatx ...
764 , coldaty ...
765 , kws.plot{:} ...
766 );
767 elseif self.type.is.d3 && self.plot3.enabled
768 self.fout.plot3{icol} = plot3 ( coldatx ...
769 , coldaty ...
770 , coldatz ...
771 , kws.plot3{:} ...
772 );
773 end
774 if self.surface.enabled && self.colormap.enabled
775 self.fout.surface{icol} = surface ( "XData", [coldatx(:), coldatx(:)] ...
776 , "YData", [coldaty(:), coldaty(:)] ...
777 , "ZData", [coldatz(:), coldatz(:)] ...
778 , "CData", [coldatc(:), coldatc(:)] ...
779 , kws.surface{:} ...
780 );
781 end
782 end
783
784 %%%% add scatter plot.
785
786 if self.type.has.scatter
787 if self.type.is.d3 && self.scatter3.enabled
788 self.fout.scatter3{icol} = scatter3 ( coldatx ...
789 , coldaty ...
790 , coldatz ...
791 , self.scatter3.size ...
792 , coldatc ...
793 , self.scatter3.marker ...
794 , kws.scatter3{:} ...
795 );
796 elseif self.type.is.d2 && self.scatter.enabled
797 self.fout.scatter{icol} = scatter ( coldatx ...
798 , coldaty ...
799 , self.scatter.size ...
800 , coldatc ...
801 , self.scatter.marker ...
802 , kws.scatter{:} ...
803 );
804 end
805 end
806
807 end % loop over plots
808
809 end % if heatmap plot.
810
811 % add axis labels.
812 if ~self.type.is.heatmap
813 if isprop(self, "xlabel") && self.xlabel.enabled; if ~pm.array.len(self.xlabel.txt); txt = colnamx; else; txt = self.xlabel.txt; end; self.fout.xlabel = xlabel(txt, kws.xlabel{:}); end
814 if isprop(self, "ylabel") && self.ylabel.enabled; if ~pm.array.len(self.ylabel.txt); txt = colnamy; else; txt = self.ylabel.txt; end; self.fout.ylabel = ylabel(txt, kws.ylabel{:}); end
815 if isprop(self, "zlabel") && self.zlabel.enabled; if ~pm.array.len(self.zlabel.txt); txt = colnamz; else; txt = self.zlabel.txt; end; self.fout.zlabel = zlabel(txt, kws.zlabel{:}); end
816 else
817 if isprop(self, "xlabel") && self.xlabel.enabled; xlabel(self.xlabel.txt, kws.xlabel{:}); end
818 if isprop(self, "ylabel") && self.ylabel.enabled; ylabel(self.ylabel.txt, kws.ylabel{:}); end
819 end
820
821 % add the colormap and colorbar.
822
823 if ~self.cenabled && self.type.is.heatmap
824 colormap(flipud(gray)); % self.fout.colormap =
825 elseif ~self.cenabled && self.type.is.contourf
826 colormap(self.fout.axes, flipud(gray)); % self.fout.colormap =
827 elseif self.cenabled
828 if ~isempty(self.colormap.map) || (isstring(self.colormap.map) && self.colormap.map ~= "")
829 cmap = self.colormap.map;
830 else
831 if self.type.has.line || self.type.has.scatter
832 cmap = "winter";
833 %if self.type.is.d3
834 % self.colormap.map = "winter";
835 %else
836 % self.colormap.map = "autumn";
837 %end
838 elseif self.type.is.heatmap
839 cmap = pm.vis.cmap.redblue();
840 elseif self.type.is.density
841 cmap = "parula";
842 end
843 end
844 if ~self.type.is.heatmap
845 colormap(self.fout.axes, cmap); % self.fout.colormap =
846 else
847 colormap(cmap); % self.fout.colormap =
848 end
849 end
850
851 if isprop(self, "colorbar")
852 if self.colorbar.enabled && (self.cenabled || self.type.is.contourf)
853 if isempty(self.colorbar.fontSize) %|| ~isa(self.colorbar.fontSize, "numeric")
854 kws.colorbar = [kws.colorbar(:); {"fontSize"}; {self.fout.axes.FontSize + 1}];
855 end
856 self.fout.colorbar = colorbar(kws.colorbar{:});
857 ylabel(self.fout.colorbar, colnamc(1));%, "fontSize", self.colorbar.fontSize, "interpreter", "none"
858 else
859 colorbar('off');
860 self.fout.colorbar = [];
861 end
862 end
863
864 % add legend.
865
866 if legendary && 0 < colindlen
867 self.fout.legend = [];
868 if ~legempty
869 lglabels = self.legend.labels;
870 end
871 if ~self.legend.enabled
872 legend(self.fout.axes, "off");
873 elseif isa(self.legend.labels, "cell") || isa(self.legend.labels, "string")
874 if isempty(self.legend.fontSize)
875 kws.legend = [kws.legend(:); {"fontSize"}; {self.fout.axes.FontSize + 1}];
876 end
877 subset = [];
878 if self.type.has.scatter && self.type.is.d2 && self.scatter.enabled
879 subset = [self.fout.scatter{:}];
880 elseif self.type.has.scatter && self.type.is.d3 && self.scatter3.enabled
881 subset = [self.fout.scatter3{:}];
882
883 elseif self.type.is.histfit && self.histfit.enabled
884 nhandle = length(self.fout.histfit);
885 subset = cell(nhandle, 1);
886 for i = 1 : nhandle
887 subset{i} = self.fout.histfit{i}(1); % get the handle to the histogram component of histfit.
888 end
889 subset = [subset{:}];
890 end
891 if ~isempty(subset)
892 self.fout.legend = legend(subset, lglabels{:}, kws.legend{:});
893 else
894 self.fout.legend = legend(lglabels{:}, kws.legend{:});
895 end
896 else
897 error ( newline ...
898 + "The specified ""legend.labels"" must be a cell array of string values." ...
899 + newline ...
900 );
901 end
902 end
903
904 %if self.type.is.targetable
905 % self.target.fout.axes = self.fout.axes;
906 %end
907
908 %%%% add title.
909
910 if self.title.enabled
911 titletxt = {};
912 for field = ["titletext", "subtitletext"] % do not change the order of elements here.
913 if isfield(self.title, field) && pm.array.len(self.title.(field))
914 titletxt = [titletxt(:); self.title.(field)(:)];
915 end
916 end
917 if ~isempty(titletxt)
918 if ~self.type.is.heatmap
919 %if ~isempty(kws)
920 % kws.title = {titletxt{:}, kws.title(:)};
921 %end
922 self.fout.title = title(self.fout.axes, titletxt{:}, kws.title{:});
923 else
924 %%%% Neither input nor output arguments are not supported when using title with heatmap.
925 title(titletxt);
926 end
927 end
928 end
929
930 %%%% set limits.
931
932 for prop = ["xlim", "ylim", "zlim"]
933 if isprop(self, prop) && ~isempty(self.(prop))
934 limit = get(self.fout.axes, prop);
935 for i = 1 : 2
936 if ~isnan(self.(prop)(i))
937 limit(i) = self.(prop)(i);
938 end
939 end
940 set(self.fout.axes, prop, limit);
941 end
942 end
943
944 %%%% set axes scales.
945
946 for prop = ["xscale", "yscale", "zscale"]
947 if isprop(self, prop) && ~isempty(self.(prop))
948 set(self.fout.axes, prop, self.(prop));
949 end
950 end
951
952 if ~self.type.is.heatmap
953 hold off;
954 %grid on;
955 %box on;
956 end
957
958 end % function
959
960 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
961
962 end
963
964 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
965
966 methods(Access = public, Hidden)
967
968 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
969
970 %> \brief
971 %> Prepare the subplot for visualization.<br>
972 %>
973 %> \param[inout] self : The input/output parent object of class [pm.vis.Subplot](@ref Subplot)
974 %> which is **implicitly** passed to this dynamic method (not by the user).<br>
975 %> \param[in] varargin : Any ``property, value`` pair of the parent object.<br>
976 %> If the property is a ``struct()``, then its value must be given as a cell array,
977 %> with consecutive elements representing the struct ``property-name, property-value`` pairs.<br>
978 %> Note that all of these property-value pairs can be also directly set via the
979 %> parent object attributes, before calling the ``premake()`` method.<br>
980 %>
981 %> \interface{premake}
982 %> \code{.m}
983 %>
984 %> s = pm.vis.Subplot(ptype, dfref);
985 %>
986 %> s.premake(varargin);
987 %> s.premake();
988 %>
989 %> \endcode
990 %>
991 %> \warning
992 %> This method has side-effects by manipulating
993 %> the existing attributes of the parent object.<br>
994 %>
995 %> \example{premake}
996 %> \code{.m}
997 %>
998 %> dfref = rand(1000, 3);
999 %> s = pm.vis.Subplot("scatter", dfref);
1000 %> s.premake("colx", 1, "coly", 2, "colc", 3)
1001 %>
1002 %> \endcode
1003 %>
1004 %> \final{premake}
1005 %>
1006 %> \author
1007 %> \JoshuaOsborne, May 22 2024, 6:41 PM, University of Texas at Arlington<br>
1008 %> \FatemehBagheri, May 20 2024, 1:25 PM, NASA Goddard Space Flight Center (GSFC), Washington, D.C.<br>
1009 %> \AmirShahmoradi, July 5 2024, 1:07 PM, NASA Goddard Space Flight Center (GSFC), Washington, D.C.<br>
1010 function premake(self, varargin)
1011 premake@pm.vis.axes.Axes(self, varargin{:});
1012 end
1013
1014 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1015
1016 %> \brief
1017 %> Reset the properties of the plot to the original default settings.<br>
1019 %> \brief
1020 %> Use this method when you change many attributes of the plot and
1021 %> you want to clean up and go back to the default settings.<br>
1022 %>
1023 %> \param[inout] self : The input/output parent object of class [pm.vis.Subplot](@ref Subplot)
1024 %> which is **implicitly** passed to this dynamic method (not by the user).<br>
1025 %> \param[in] varargin : Any ``property, value`` pair of the parent object.<br>
1026 %> If the property is a ``struct()``, then its value must be given as a cell array,
1027 %> with consecutive elements representing the struct ``property-name, property-value`` pairs.<br>
1028 %> Note that all of these property-value pairs can be also directly set via the
1029 %> parent object attributes, before calling the ``make()`` method.<br>
1030 %>
1031 %> \interface{reset}
1032 %> \code{.m}
1033 %>
1034 %> pm.vis.Subplot.reset() % reset the plot to the default settings.
1035 %>
1036 %> \endcode
1037 %>
1038 %> \final{reset}
1039 %>
1040 %> \author
1041 %> \JoshuaOsborne, May 22 2024, 6:43 PM, University of Texas at Arlington<br>
1042 %> \FatemehBagheri, May 20 2024, 1:25 PM, NASA Goddard Space Flight Center (GSFC), Washington, D.C.<br>
1043 %> \AmirShahmoradi, July 5 2024, 1:07 PM, NASA Goddard Space Flight Center (GSFC), Washington, D.C.<br>
1044 function reset(self, varargin)
1045 self.rows = [];
1046 self.fout = struct();
1047 self.newprop("colx", {});
1048 if self.type.is.d2 || self.type.is.d3
1049 self.newprop("coly", {});
1050 if self.type.is.d3
1051 self.newprop("colz", {});
1052 end
1053 end
1054 reset@pm.vis.axes.Axes(self, varargin{:});
1055 end
1056
1057 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1058
1059 end
1060
1061end
function name(in vendor)
Return the MPI library name as used in naming the ParaMonte MATLAB shared library directories.
function list()
Return a list of MATLAB strings containing the names of OS platforms supported by the ParaMonte MATLA...
function version(in silent)
Return a scalar MATLAB string containing the latest available ParaMonte MATLAB version newer than the...
This is the class for generating instances of objects that contain the specifications of various type...
Definition: Axes.m:622
function Axes(in ptype, in varargin)
Construct and return an object of class pm.vis.axes.Axes.
This is the abstract class for generating instances of objects that contain the specifications of a c...
Definition: Cascade.m:32
This is the abstract class for generating instances of objects that can contain basic attributes requ...
Definition: DataFrame.m:25
function rowslog(in self, in count, in start, in stop)
Generate and return a natural logarithmically-spaced range of indices from the row indices of the inp...
This is the abstract class for generating instances of objects that contain the specifications of var...
Definition: Figure.m:27
This is the base class for generating subclass of MATLAB handle superclass whose annoying methods are...
Definition: Handle.m:24
This is the base class for generating instances of objects that contain the specifications of various...
Definition: Plot.m:29
This is the SubplotContour3 class for generating instances of 3-dimensional Contour Subplot visualiza...
This is the SubplotContour class for generating instances of 2-dimensional Contour Subplot visualizat...
This is the SubplotContourf class for generating instances of 2-dimensional Contour Subplot visualiza...
This is the SubplotEllipse3 class for generating instances of 3-dimensional Ellipse Subplot visualiza...
This is the SubplotEllipse class for generating instances of 2-dimensional Ellipse Subplot visualizat...
This is the SubplotHeatmap class for generating instances of 2-dimensional Heatmap Subplot visualizat...
This is the SubplotHistfit class for generating instances of 2-dimensional Histfit Subplot visualizat...
This is the SubplotHistogram2 class for generating instances of 2-dimensional Histogram2 Subplot visu...
This is the SubplotHistogram class for generating instances of 1-dimensional Histogram Subplot visual...
This is the SubplotLine3 class for generating instances of 3-dimensional Line Subplot visualizations ...
Definition: SubplotLine3.m:26
This is the SubplotLineScatter3 class for generating instances of 3-dimensional Line-Scatter Subplot ...
This is the SubplotLineScatter class for generating instances of 2-dimensional Line-Scatter Subplot v...
This is the SubplotLine class for generating instances of 2-dimensional Line Subplot visualizations b...
Definition: SubplotLine.m:26
This is the SubplotScatter3 class for generating instances of 3-dimensional Scatter Subplot visualiza...
This is the SubplotScatter class for generating instances of 3-dimensional Scatter Subplot visualizat...
This is the abstract class for generating instances of axes with various types of plots from one or m...
Definition: Subplot.m:188
function premake(in self, in varargin)
Prepare the subplot for visualization.
function Subplot(in ptype, in dfref, in varargin)
Construct and return an object of class pm.vis.Subplot.
function reset(in self, in varargin)
Reset the properties of the plot to the original default settings.
Property rows
Definition: Subplot.m:240
Property dfref
Definition: Subplot.m:201
function make(in self, in varargin)
Generate a plot from the selected columns of the parent object component dfref.
Property fout
Definition: Subplot.m:209
This is the abstract class for generating instances of objects that contain the specifications of var...
Definition: Tile.m:23
This is the base class for generating instances of figures containing a square symmetric tiling of su...
Definition: Triplex.m:31
function clean()
Remove all paths that contain the ParaMonte lib directory from the MATLAB path variable.
function kde2d(in data, in resol, in xymin, in xymax)
Compute the Gaussian kernel density estimate of the input bivariate data.
function which(in vendor)
Return the a MATLAB string containing the path to the first mpiexec executable binary found in system...