2%> This is the
class for generating instances of objects
3%> that contain the specifications of various types of plots.<br>
6%> This
class primarily serves as the superclass for
7%> the visualization-ready subclass [pm.vis.Subplot](@ref
Subplot)
8%> and its subclasses, all accessible to the end users.<br>
10%> Dynamic
class attributes
11%> ------------------------
13%> This
class contains a set of attributes that are defined dynamically at runtime
14%>
for the output
object depending on its subclass (plot type it represents).<br>
15%> The following is the
list of all
class attributes that are dynamically added
16%> to the instantiated
class objects based on the specified input plot type.<br>
17%> See also the
explicit class and superclass attributes not listed below.<br>
20%> <li> ``axes`` (available
for all subplots except [pm.vis.SubplotHeatmap](@ref
SubplotHeatmap))<br>
22%> A MATLAB ``
struct`` whose fields and values are passed as
23%> keyword arguments to the MATLAB intrinsic ``set()``
for
24%> the current active axes
object in the plot ``gca()``.<br>
26%> <li> ``colorbar`` (available
for all axes types that allow color-mapping)<br>
28%> A MATLAB ``
struct`` whose fields and their values will
29%> be passed as keyword arguments to the MATLAB intrinsic ``colorbar``.<br>
30%> The following are the
default components of ``colorbar``:<br>
35%> A ``logical`` value. If ``
true``, the
36%> color bar will be applied to the axes.<br>
40%> See the acceptable keyword arguments
41%> of the MATLAB intrinsic ``colorbar()``.<br>
45%> Keep in mind that MATLAB keyword arguments are
case-INsensitive.<br>
46%> Hence, ensure you
do not add the same keyword as multiple different fields.<br>
47%> For example, ``colorbar.color`` and ``colorbar.Color`` are the same,
48%> and only one of the two will be processed.<br>
53%> self.colorbar.enabled =
true;
54%> self.colorbar.location =
"west";
59%> <li> ``colormap`` (available
for all axes types that allow color-mapping)
61%> A MATLAB ``
struct`` whose fields and their values will be passed
62%> as keyword arguments to the MATLAB intrinsic ``colormap``.<br>
63%> The following are the
default components of ``colormap``:<br>
68%> A logical value. If ``
true``, the
69%> colormap will be applied to the axes.<br>
73%> A
string or a vector of color triplets or any other value
74%> that the intrinsic MATLAB ``colormap`` accepts as input.<br>
76%> This option is relevant only to visualizations that allow color-mapping.<br>
80%> Keep in mind that MATLAB keyword arguments are
case-INsensitive.<br>
81%> Hence, ensure you
do not add the same keyword as multiple different fields.<br>
82%> For example, ``colormap.map`` and ``colormap.Map`` are the same,
83%> and only one of the two will be processed.<br>
88%> self.colormap.enabled =
true;
89%> self.colormap.map =
"winter";
90%> self.colormap.map =
"winter";
91%> self.colormap.map =
'default';
92%> self.colormap.map = pm.vis.cmap.redblue();
97%> <li> ``contour`` (available only
for [pm.vis.SubplotContour](@ref
SubplotContour) axes types)
99%> A MATLAB ``
struct`` whose fields and their values will be passed
100%> as keyword arguments to the MATLAB intrinsic ``contour``.<br>
101%> The following are the
default components of ``contour``:<br>
106%> A logical value. If ``
true``, the
107%> contour will be added to the axes.
111%> See the corresponding positional argument of the MATLAB intrinsic ``contourf()``.<br>
115%> See the corresponding positional argument of the MATLAB intrinsic ``contourf()``.<br>
119%> See the acceptable keyword arguments of the MATLAB intrinsic ``contour()``.<br>
123%> Keep in mind that MATLAB keyword arguments are
case-INsensitive.<br>
124%> Hence, ensure you
do not add the same keyword as multiple different fields.<br>
129%> self.contour.enabled =
true;
130%> self.contour.lineWidth =
"none";
135%> <li> ``contour3`` (available only
for [pm.vis.SubplotContour3](@ref
SubplotContour3) axes types)
137%> A MATLAB ``
struct`` whose fields and their values will be passed
138%> as keyword arguments to the MATLAB intrinsic ``contour3``.<br>
139%> The following are the
default components of ``contour3``:<br>
144%> A logical value. If ``
true``, the
145%> contour3 will be added to the axes.<br>
149%> See the corresponding positional argument of the MATLAB intrinsic ``contourf()``.<br>
153%> See the corresponding positional argument of the MATLAB intrinsic ``contourf()``.<br>
157%> See the acceptable keyword arguments of the MATLAB intrinsic ``contour3()``.<br>
161%> Keep in mind that MATLAB keyword arguments are
case-INsensitive.<br>
162%> Hence, ensure you
do not add the same keyword as multiple different fields.<br>
167%> self.contour3.enabled =
true;
168%> self.contour3.lineWidth =
"none";
173%> <li> ``contourf`` (available only
for [pm.vis.SubplotContourf](@ref
SubplotContourf) axes types)
175%> A MATLAB ``
struct`` whose fields and their values will be passed
176%> as keyword arguments to the MATLAB intrinsic ``contourf``.<br>
177%> The following are the
default components of ``contourf``:<br>
182%> A logical value. If ``
true``, the
183%> contourf will be added to the axes.<br>
187%> See the corresponding positional argument of the MATLAB intrinsic ``contourf()``.<br>
191%> See the corresponding positional argument of the MATLAB intrinsic ``contourf()``.<br>
195%> See the acceptable keyword arguments of the MATLAB intrinsic ``contourf()``.<br>
199%> Keep in mind that MATLAB keyword arguments are
case-INsensitive.<br>
200%> Hence, ensure you
do not add the same keyword as multiple different fields.<br>
205%> self.contourf.enabled =
true;
206%> self.contourf.lineWidth =
"none";
211%> <li> ``histfit`` (available only
for [pm.vis.SubplotHistfit](@ref
SubplotHistfit) axes types)
213%> A MATLAB ``
struct`` whose fields and their values will be passed
214%> as keyword arguments to the MATLAB intrinsic ``histfit``.<br>
215%> The following are the
default components of ``histfit``:<br>
220%> A logical value. If ``
true``, the
221%> histfit will be added to the axes.<br>
225%> See the corresponding positional argument of the MATLAB intrinsic ``histfit()``.<br>
229%> See the corresponding positional argument of the MATLAB intrinsic ``histfit()``.<br>
233%> Keep in mind that MATLAB keyword arguments are
case-INsensitive.<br>
234%> Hence, ensure you
do not add the same keyword as multiple different fields.<br>
239%> self.histfit.enabled =
true;
240%> self.histfit.nbins = 20;
245%> <li> ``histogram`` (available only
for [pm.vis.SubplotHistogram](@ref
SubplotHistogram) axes types)
247%> A MATLAB ``
struct`` whose fields and their values will be passed
248%> as keyword arguments to the MATLAB intrinsic ``histogram``.<br>
249%> The following are the
default components of ``histogram``:<br>
254%> A logical value. If ``
true``, the
255%> histogram will be added to the axes.<br>
259%> See the corresponding positional argument of the MATLAB intrinsic ``histogram()``.<br>
263%> See the corresponding positional argument of the MATLAB intrinsic ``histogram()``.<br>
267%> See the corresponding acceptable keyword arguments of the MATLAB intrinsic ``histogram()``.<br>
271%> Keep in mind that MATLAB keyword arguments are
case-INsensitive.<br>
272%> Hence, ensure you
do not add the same keyword as multiple different fields.<br>
274%> \example{histogram}
277%> self.histogram.enabled =
true;
278%> self.histogram.edgeColor =
"none";
279%> self.histogram.nbins = 20;
284%> <li> ``histogram2`` (available only
for [pm.vis.SubplotHistogram2](@ref
SubplotHistogram2) axes types)
286%> A MATLAB ``
struct`` whose fields and their values will be passed
287%> as keyword arguments to the MATLAB intrinsic ``histogram2``.<br>
288%> The following are the
default components of ``histogram2``:<br>
293%> A logical value. If ``
true``, the
294%> histogram2 will be added to the axes.<br>
298%> See the corresponding positional argument of the MATLAB intrinsic ``histogram2()``.<br>
302%> See the corresponding positional argument of the MATLAB intrinsic ``histogram2()``.<br>
306%> See the corresponding positional argument of the MATLAB intrinsic ``histogram2()``.<br>
310%> See the corresponding acceptable keyword arguments of the MATLAB intrinsic ``histogram2()``.<br>
314%> Keep in mind that MATLAB keyword arguments are
case-INsensitive.<br>
315%> Hence, ensure you
do not add the same keyword as multiple different fields.<br>
317%> \example{histogram2}
320%> self.histogram2.enabled =
true;
321%> self.histogram2.edgeColor =
"none";
322%> self.histogram2.nbins = 20;
327%> <li> ``legend`` (available
for all axes types except [pm.vis.SubplotHeatmap](@ref
SubplotHeatmap))
329%> A MATLAB ``
struct`` whose fields and values are passed
330%> as keyword arguments to the MATLAB intrinsic ``title()``.<br>
332%> <li> ``maxnoise`` (available only
for [pm.vis.SubplotContour](@ref SuplotContour)/[pm.vis.SubplotContourf](@ref SuplotContourf)/[pm.vis.SubplotContour3](@ref SuplotContour3) axes types)
334%> A
float indicating the threshold below
which the kernel density
335%> estimate is considered to be noise and is rounded to zero.<br>
336%> The higher
this value is, the less noise will be
337%> visible in the resulting contour plots.<br>
338%> If empty, the
default value is ``0.001``.<br>
342%> A MATLAB ``
struct`` whose fields and their values will be passed
343%> as keyword arguments to the MATLAB intrinsic ``plot``.<br>
344%> The following are the
default components of ``plot``:<br>
349%> A logical value. If ``
true``, the
350%> plot will be added to the axes.<br>
354%> See the corresponding positional argument of the MATLAB intrinsic ``plot()``.<br>
358%> See the corresponding acceptable keyword arguments of the MATLAB intrinsic ``plot()``.<br>
362%> Keep in mind that MATLAB keyword arguments are
case-INsensitive.<br>
363%> Hence, ensure you
do not add the same keyword as multiple different fields.<br>
368%> self.plot.enabled =
true;
369%> self.plot.lineWidth = 1;
376%> A MATLAB ``
struct`` whose fields and their values will be passed
377%> as keyword arguments to the MATLAB intrinsic ``plot3``.<br>
378%> The following are the
default components of ``plot3``:<br>
383%> A logical value. If ``
true``, the
384%> ``plot3`` will be added to the axes.<br>
388%> See the corresponding positional argument of the MATLAB intrinsic ``plot3()``.<br>
392%> See the corresponding acceptable keyword arguments of the MATLAB intrinsic ``plot3()``.<br>
396%> Keep in mind that MATLAB keyword arguments are
case-INsensitive.<br>
397%> Hence, ensure you
do not add the same keyword as multiple different fields.<br>
402%> self.plot3.enabled =
true;
403%> self.plot3.lineWidth = 1;
408%> <li> ``precision`` (available only
for [pm.vis.SubplotHeatmap](@ref
SubplotHeatmap) axes types)
410%> A scalar integer representing the number of digits after
411%> the decimal point
for the values that appear in each cell
412%> of the heatmap. The
default value is set by MATLAB.<br>
414%> <li> ``resolution`` (available only
for [pm.vis.SubplotContour](@ref SuplotContour),
415%> [pm.vis.SubplotContourf](@ref SuplotContourf), [pm.vis.SubplotContour3](@ref SuplotContour3) axes types)
417%> A scalar integer indicating the grid resolution
for discretization of
418%> the data during the kernel density estimation. It must be a power of
419%> two, otherwise it will be changed to the next power of two at the
420%> time of
using it. If empty, the
default value is ``2^9``.<br>
424%> A MATLAB ``
struct`` whose fields and their values will be passed
425%> as keyword arguments to the MATLAB intrinsic ``scatter``.<br>
426%> The following are the
default components of ``scatter``:<br>
431%> A logical value. If ``
true``, the
432%> scatter will be added to the axes.<br>
436%> See the corresponding ``sz`` positional argument of the MATLAB intrinsic ``plot3()``.<br>
440%> See the corresponding ``C`` positional argument of the MATLAB intrinsic ``plot3()``.<br>
444%> See the corresponding ``filled`` positional argument of the MATLAB intrinsic ``plot3()``.<br>
448%> See the corresponding ``mkr`` positional argument of the MATLAB intrinsic ``plot3()``.<br>
452%> See the corresponding acceptable keyword arguments of the MATLAB intrinsic ``scatter()``.<br>
456%> Keep in mind that MATLAB keyword arguments are
case-INsensitive.<br>
457%> Hence, ensure you
do not add the same keyword as multiple different fields.<br>
462%> self.scatter.enabled =
true; % add scatter()
463%> self.scatter.color =
"red"; % set the points color
464%> self.scatter.marker =
"."; % set the marker type
465%> self.scatter.size = 10; % set the point size
466%> self.scatter.lineWidth = 0;
473%> A MATLAB ``
struct`` whose fields and their values will be passed
474%> as keyword arguments to the MATLAB intrinsic ``scatter3``.<br>
475%> The following are the
default components of ``scatter3``:<br>
480%> A logical value. If ``
true``, the
481%> scatter3 will be added to the axes.<br>
485%> See the corresponding ``sz`` positional argument of the MATLAB intrinsic ``plot3()``.<br>
489%> See the corresponding ``C`` positional argument of the MATLAB intrinsic ``plot3()``.<br>
493%> See the corresponding ``filled`` positional argument of the MATLAB intrinsic ``plot3()``.<br>
497%> See the corresponding ``mkr`` positional argument of the MATLAB intrinsic ``plot3()``.<br>
501%> See the corresponding acceptable keyword arguments of the MATLAB intrinsic ``scatter3()``.<br>
505%> Keep in mind that MATLAB keyword arguments are
case-INsensitive.<br>
506%> Hence, ensure you
do not add the same keyword as multiple different fields.<br>
511%> self.scatter3.enabled =
true; % add scatter3()
512%> self.scatter3.color =
"red"; % set the points color
513%> self.scatter3.marker =
"."; % set the marker type
514%> self.scatter3.size = 10; % set the point size
515%> self.scatter3.lineWidth = 0;
520%> <li> ``surface`` (available only
for [pm.vis.SubplotLine](@ref
SubplotLine), [pm.vis.SubplotLineScatter](@ref pm.vis.SubplotLineScatter),
523%> A MATLAB ``
struct`` whose fields and their values will be passed
524%> as keyword arguments to the MATLAB intrinsic ``surface``.<br>
525%> The following are the
default components of ``surface``:<br>
530%> A logical value. If ``
true``, the
531%> surface will be added to the axes.<br>
535%> See the corresponding acceptable keyword arguments of the MATLAB intrinsic ``surface()``.<br>
539%> Keep in mind that MATLAB keyword arguments are
case-INsensitive.<br>
540%> Hence, ensure you
do not add the same keyword as multiple different fields.<br>
545%> self.surface.enabled =
true;
546%> self.surface.edgeColor = 1;
551%> <li> ``title`` (available
for all axes types)
553%> A MATLAB ``
struct`` whose fields and values are passed
554%> as keyword arguments to the MATLAB intrinsic ``title()``.<br>
556%> <li> ``xlabel`` (available
for all axes types)
558%> A MATLAB ``
struct`` whose fields and values are passed
559%> as keyword arguments to the MATLAB intrinsic ``xlabel()``.<br>
561%> <li> ``ylabel`` (available
for all axes types)
563%> A MATLAB ``
struct`` whose fields and values are passed
564%> as keyword arguments to the MATLAB intrinsic ``ylabel()``.<br>
566%> <li> ``zlabel`` (available only
for all tri-axes axes types)
568%> A MATLAB ``
struct`` whose fields and values are passed
569%> as keyword arguments to the MATLAB intrinsic ``zlabel()``.<br>
571%> <li> ``xlim`` (available
for all axes types, except [pm.vis.SubplotHeatmap](@ref
SubplotHeatmap))
573%> A MATLAB vector of length ``2`` whose fields and values are
574%> passed as keyword arguments to the MATLAB intrinsic ``xlim()``.<br>
576%> <li> ``ylim`` (available
for all axes types, except [pm.vis.SubplotHeatmap](@ref
SubplotHeatmap))
578%> A MATLAB vector of length ``2`` whose fields and values are
579%> passed as keyword arguments to the MATLAB intrinsic ``ylim()``.<br>
581%> <li> ``zlim`` (available only
for all tri-axes axes types)
583%> A MATLAB vector of length ``2`` whose fields and values are
584%> passed as keyword arguments to the MATLAB intrinsic ``zlim()``.<br>
586%> <li> ``xscale`` (available
for all axes types, except [pm.vis.SubplotHeatmap](@ref
SubplotHeatmap))
588%> A MATLAB
string whose value is passed directly to the MATLAB intrinsic
589%> ``xscale()`` to set the axis scale to either logarithmic or linear.<br>
590%> Possible values are: ``
"log"``, ``
"linear"``.<br>
591%> The
default behavior is set by MATLAB.<br>
593%> <li> ``yscale`` (available
for all axes types, except [pm.vis.SubplotHeatmap](@ref
SubplotHeatmap))
595%> A MATLAB
string whose value is passed directly to the MATLAB intrinsic
596%> ``yscale()`` to set the axis scale to either logarithmic or linear.<br>
597%> Possible values are: ``
"log"``, ``
"linear"``.<br>
598%> The
default behavior is set by MATLAB.<br>
600%> <li> ``zscale`` (available only
for all tri-axes axes types)
602%> A MATLAB
string whose value is passed directly to the MATLAB intrinsic
603%> ``zscale()`` to set the axis scale to either logarithmic or linear.<br>
604%> Possible values are: ``
"log"``, ``
"linear"``.<br>
605%> The
default behavior is set by MATLAB.<br>
609%> While dynamic addition of
class attributes is not ideal, the current
610%> design was deemed unavoidable and best, given the constraints of the
611%> MATLAB language and visualization tools.<br>
614%> [pm.matlab.Handle](@ref
Handle)<br>
619%> \FatemehBagheri, May 20 2024, 1:25 PM, NASA Goddard Space Flight Center (GSFC), Washington, D.C.<br>
620%> \AmirShahmoradi, May 16 2016, 9:03 AM, Oden Institute
for Computational Engineering and Sciences (ICES), UT Austin<br>
621classdef
Axes < pm.matlab.Handle
623 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
625 properties(Access =
protected, Hidden)
629 %> An auxiliary MATLAB ``
struct`` containing plot type information.
635 %> An auxiliary scalar MATLAB ``logical`` that is
true if plot is color-mapped.
640 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
642 methods(Access =
public)
644 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
647 %> Construct and
return an
object of
class [pm.vis.axes.Axes](@ref
Axes).<br>
650 %> This function is the constructor of the
class [pm.vis.axes.Axes](@ref
Axes).<br>
651 %> For more information, see the documentation of the
class [pm.vis.axes.Axes](@ref
Axes).<br>
653 %> \param[in] ptype : The input scalar MATLAB
string containing the
name of the
654 %> subclass that whose parent is
Axes (e.g.,
"heatmap").<br>
655 %> Supported plot names are:<br>
659 %> <li> ``
"scatter"``
660 %> <li> ``
"scatter3"``
661 %> <li> ``
"lineScatter"``
662 %> <li> ``
"lineScatter3"``
663 %> <li> ``
"histogram2"``
664 %> <li> ``
"histogram"``
665 %> <li> ``
"contour3"``
666 %> <li> ``
"contourf"``
667 %> <li> ``
"contour"``
668 %> <li> ``
"histfit"``
669 %> <li> ``
"heatmap"``
672 %> \param[in] varargin : Any ``property, value`` pair of the
object.<br>
673 %> If the
property is a ``
struct()``, then its value must be given as a cell array,
674 %> with consecutive elements representing the
struct ``property-
name, property-value`` pairs.<br>
675 %> Note that all of these property-value pairs can be also directly set via the
676 %> parent
object attributes, before calling the ``premake()`` method.<br>
679 %> ``self`` : The output scalar
object of
class [pm.vis.axes.Axes](@ref
Axes).<br>
684 %> axes = pm.vis.axes.
Axes(ptype);
689 %> \include{lineno} example/vis/axes/
Axes/main.m
691 %> \include{lineno} example/vis/axes/
Axes/main.out.m
696 %> \JoshuaOsborne, May 21 2024, 5:59 AM, University of Texas at Arlington<br>
697 %> \FatemehBagheri, May 20 2024, 1:25 PM, NASA Goddard Space Flight Center (GSFC), Washington, D.C.<br>
698 %> \AmirShahmoradi, May 16 2016, 9:03 AM, Oden Institute
for Computational Engineering and Sciences (ICES), UT Austin<br>
699 function self =
Axes(ptype, varargin)
701 if nargin < 1 || ~pm.introspection.istype(ptype,
"string", 1) || ~pm.array.len(ptype)
702 help(
"pm.vis.axes.Axes");
704 +
"The input argument ``ptype`` is missing." + newline ...
705 +
"For more information, see the class documentation displayed above." + newline ...
709 % lower the first character.
710 ptype = string(ptype);
711 ptype{1} = lower(ptype{1});
714 self.type =
struct();
715 self.type.name = ptype;
716 pnamel = lower(ptype);
717 self.type.is.line = strcmpi(pnamel,
"line" );
718 self.type.is.line3 = strcmpi(pnamel,
"line3" );
719 self.type.is.scatter = strcmpi(pnamel,
"scatter" );
720 self.type.is.scatter3 = strcmpi(pnamel,
"scatter3" );
721 self.type.is.lineScatter = strcmpi(pnamel,
"lineScatter" );
722 self.type.is.lineScatter3 = strcmpi(pnamel,
"lineScatter3");
723 self.type.is.histogram2 = strcmpi(pnamel,
"histogram2" );
724 self.type.is.histogram = strcmpi(pnamel,
"histogram" );
725 self.type.is.contour3 = strcmpi(pnamel,
"contour3" );
726 self.type.is.contourf = strcmpi(pnamel,
"contourf" );
727 self.type.is.contour = strcmpi(pnamel,
"contour" );
728 self.type.is.heatmap = strcmpi(pnamel,
"heatmap" );
729 self.type.is.histfit = strcmpi(pnamel,
"histfit" );
730 self.type.is.diffusion = self.type.is.contour || self.type.is.contourf || self.type.is.contour3;
731 self.type.is.density = self.type.is.diffusion || self.type.is.histfit || self.type.is.histogram || self.type.is.histogram2;
732 self.type.is.d3 = self.type.is.line3 || self.type.is.scatter3 || self.type.is.lineScatter3;
733 self.type.is.d1 = self.type.is.histfit || self.type.is.histogram || self.type.is.heatmap;
734 self.type.is.d2 = ~(self.type.is.d1 || self.type.is.d3);
735 self.type.is.triaxes = self.type.is.d3 || self.type.is.histogram2 || self.type.is.contour3;
736 %self.type.is.targetable =
false; %xx ~self.type.is.heatmap && ~ self.type.is.d3;
737 self.type.has.line = self.type.is.line || self.type.is.line3 || self.type.is.lineScatter || self.type.is.lineScatter3;
738 self.type.has.scatter = self.type.is.scatter || self.type.is.scatter3 || self.type.is.lineScatter || self.type.is.lineScatter3;
740 self.reset(varargin{:}); % This is the subclass method!
744 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
747 %> Reset the properties of the plot to the original
default settings and
return nothing.<br>
750 %> Use
this method when you change many attributes of the plot and
751 %> you want to
clean up and go back to the
default settings.<br>
753 %> \param[inout] self : The input/output parent
object of
class [pm.vis.axes.Axes](@ref
Axes)
754 %>
which is **implicitly** passed to
this dynamic method (not by the user).<br>
755 %> \param[in] varargin : Any ``property, value`` pair of the parent
object.<br>
756 %> If the
property is a ``
struct()``, then its value must be given as a cell array,
757 %> with consecutive elements representing the
struct ``property-
name, property-value`` pairs.<br>
758 %> Note that all of these property-value pairs can be also directly set via the
759 %> parent
object attributes.<br>
764 %> a = pm.vis.axes.Axes(ptype)
766 %> a.reset(varargin) % reset the plot to settings in ``varargin`` and the rest to
default.
767 %> a.reset() % reset the plot to the
default settings.
774 %> \FatemehBagheri, May 20 2024, 1:25 PM, NASA Goddard Space Flight Center (GSFC), Washington, D.C.<br>
775 %> \AmirShahmoradi, May 16 2016, 9:03 AM, Oden Institute
for Computational Engineering and Sciences (ICES), UT Austin<br>
776 function reset(self, varargin)
778 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
779 %%%% RULE 0: Any non-MATLAB-
default setting must be preferably set in the premake() method to override user null values.
780 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
786 if ~self.type.is.heatmap
787 self.newprop("axes", struct());
789 self.axes.color = [];
790 self.axes.colorScale = [];
791 self.axes.fontName = [];
792 self.axes.fontSize = fontSize_def;
793 self.axes.fontSizeMode = [];
794 self.axes.fontSmoothing = [];
795 self.axes.fontWeight = [];
796 self.axes.xgrid = [];
797 self.axes.ygrid = [];
798 if self.type.is.triaxes
799 self.axes.zgrid = [];
801 self.axes.enabled = [];
806 self.newprop("title", struct());
807 if ~self.type.is.heatmap
808 self.title.fontSize = fontSize_def;
809 self.title.interpreter = [];
810 self.title.fontWeight = [];
811 self.title.color = []; %[0, 0, 0];
813 self.title.enabled = [];
814 self.title.titletext = [];
815 if ~self.type.is.heatmap
816 self.title.subtitletext = [];
821 self.newprop("xlabel", struct());
822 if ~self.type.is.heatmap
823 self.xlabel.color = []; %[0.15, 0.15, 0.15];
824 self.xlabel.fontAngle = [];
825 self.xlabel.fontSize = fontSize_def;
826 self.xlabel.fontWeight = [];
827 self.xlabel.interpreter = [];
828 self.xlabel.rotation = [];
829 self.newprop("xscale", []);
830 self.newprop("xlim", []);
832 self.xlabel.enabled = [];
833 self.xlabel.txt = [];
838 self.newprop("ylabel", self.xlabel);
839 if ~self.type.is.heatmap
840 self.newprop("yscale", []);
841 self.newprop("ylim", []);
846 if self.type.is.triaxes
847 self.newprop("zlabel", self.xlabel);
848 self.newprop("zlim", []);
849 self.newprop("zscale", []);
852 %%%% colc, colorbar, colormap
854 if self.type.is.heatmap || ~self.type.is.d1
856 if self.type.has.line || self.type.has.scatter
857 self.newprop("colc", {});
860 if ~self.type.is.heatmap
861 self.newprop(
"colorbar",
struct());
862 self.colorbar.fontSize = fontSize_def;
863 self.colorbar.direction =
'normal';
864 self.colorbar.limits = [];
865 self.colorbar.location =
'eastoutside';
866 self.colorbar.ticks = [];
867 self.colorbar.tickLabels = [];
868 self.colorbar.tickLabelInterpreter =
'tex';
869 self.colorbar.enabled = [];
872 self.newprop(
"colormap",
struct());
873 self.colormap.enabled = [];
874 self.colormap.map = []; %
'default'
880 if ~self.type.is.heatmap
881 self.newprop(
"legend",
struct());
882 self.legend.box =
'off';
883 self.legend.color =
'none';
884 self.legend.fontSize = fontSize_def;
885 self.legend.interpreter =
'none';
886 self.legend.location = [];
887 self.legend.numColumns = [];
888 self.legend.textColor = [];
889 self.legend.enabled = [];
890 self.legend.labels = {};
895 %
if ~self.type.is.targetable
896 % self.newprop(
"target");
899 %%%%%%%%%%%%%%%%%%%%%%%
900 %%%% heatmap attributes
901 %%%%%%%%%%%%%%%%%%%%%%%
903 if self.type.is.heatmap
904 self.newprop(
"heatmap",
struct());
905 self.newprop(
"precision", []);
906 self.heatmap.colorbarVisible = [];
907 self.heatmap.colorLimits = [];
908 self.heatmap.missingDataColor = [];
909 self.heatmap.fontName = [];
910 self.heatmap.fontSize = fontSize_def;
911 self.heatmap.enabled = [];
914 %%%%%%%%%%%%%%%%%%%%%%%
915 %%%% density attributes
916 %%%%%%%%%%%%%%%%%%%%%%%
918 if self.type.is.histfit
919 self.newprop(
"histfit",
struct());
920 self.histfit.enabled = [];
921 self.histfit.dist = [];
922 self.histfit.nbins = [];
925 if self.type.is.histogram
926 self.newprop(
"histogram",
struct());
927 self.histogram.binLimitsMode = [];
928 self.histogram.binMethod = [];
929 self.histogram.binWidth = [];
930 self.histogram.displayStyle = [];
931 self.histogram.edgeAlpha = [];
932 self.histogram.edgeColor = [];
933 self.histogram.faceAlpha = [];
934 self.histogram.faceColor = [];
935 self.histogram.lineStyle = [];
936 self.histogram.lineWidth = [];
937 self.histogram.normalization = [];
938 self.histogram.orientation = [];
939 self.histogram.enabled = [];
940 self.histogram.edges = [];
941 self.histogram.nbins = [];
944 if self.type.is.histogram2
945 self.newprop(
"histogram2",
struct());
946 self.histogram2.binWidth = [];
947 self.histogram2.xbinLimits = [];
948 self.histogram2.xbinLimitsMode = [];
949 self.histogram2.ybinLimits = [];
950 self.histogram2.ybinLimitsMode = [];
951 self.histogram2.binMethod = [];
952 self.histogram2.showEmptyBins = [];
953 self.histogram2.normalization = [];
954 self.histogram2.displayStyle = [];
955 self.histogram2.edgeAlpha = [];
956 self.histogram2.edgeColor = [];
957 self.histogram2.faceAlpha = [];
958 self.histogram2.faceColor = [];
959 self.histogram2.faceLighting = [];
960 self.histogram2.lineStyle = [];
961 self.histogram2.lineWidth = [];
962 self.histogram2.enabled = [];
963 self.histogram2.nbins = [];
964 self.histogram2.xedges = [];
965 self.histogram2.yedges = [];
968 if self.type.is.contour || self.type.is.contourf || self.type.is.contour3
969 self.newprop(
"resolution", 2^9);
970 self.newprop(
"maxnoise", 0.001);
973 if self.type.is.contour
974 self.newprop(
"contour",
struct());
975 self.contour.color = [];
976 self.contour.labelSpacing = [];
977 self.contour.lineWidth = [];
978 self.contour.showText = [];
979 self.contour.enabled = [];
980 self.contour.levels = [];
981 self.contour.lineSpec = [];
984 if self.type.is.contourf
985 self.newprop(
"contourf",
struct());
986 self.contourf.edgecolor = [];
987 self.contourf.color = [];
988 self.contourf.labelSpacing = [];
989 self.contourf.lineWidth = [];
990 self.contourf.showText = [];
991 self.contourf.enabled = [];
992 self.contourf.levels = [];
993 self.contourf.lineSpec = [];
996 if self.type.is.contour3
997 self.newprop(
"contour3",
struct());
998 self.contour3.color = [];
999 self.contour3.labelSpacing = [];
1000 self.contour3.lineWidth = [];
1001 self.contour3.showText = [];
1002 self.contour3.enabled = [];
1003 self.contour3.levels = [];
1004 self.contour3.lineSpec = [];
1007 %%%%%%%%%%%%%%%%%%%%%%%%%%%%
1008 %%%% line/scatter attributes
1009 %%%%%%%%%%%%%%%%%%%%%%%%%%%%
1011 if self.type.is.line || self.type.is.lineScatter
1012 self.newprop(
"surface",
struct());
1013 self.newprop(
"plot",
struct());
1014 self.plot.color = [];
1015 self.plot.lineWidth = [];
1016 self.plot.lineStyle = [];
1017 self.plot.markeredgeColor = [];
1018 self.plot.markerFaceColor = [];
1019 self.plot.markerIndices = [];
1020 self.plot.markerSize = [];
1021 self.plot.enabled = [];
1024 if self.type.is.line3 || self.type.is.lineScatter3
1025 self.newprop(
"surface",
struct());
1026 self.newprop(
"plot3",
struct());
1027 self.plot3.color = {};
1028 self.plot3.lineWidth = {};
1029 self.plot3.lineStyle =
'-';
1030 self.plot3.markeredgeColor = [];
1031 self.plot3.markerFaceColor = [];
1032 self.plot3.markerIndices = [];
1033 self.plot3.markerSize = [];
1034 self.plot3.enabled = [];
1037 if isprop(self,
"surface")
1038 self.surface.alignVertexCenters = {};
1039 self.surface.backFaceLighting = {};
1040 self.surface.edgeAlpha = {};
1041 self.surface.edgeColor = {};
1042 self.surface.edgeLighting = {};
1043 self.surface.faceAlpha = {};
1044 self.surface.faceColor = {};
1045 self.surface.faceLighting = {};
1046 self.surface.lineStyle = {};
1047 self.surface.lineWidth = {};
1048 self.surface.marker = {};
1049 self.surface.markerEdgeColor = {};
1050 self.surface.markerFaceColor = {};
1051 self.surface.markerSize = {};
1052 self.surface.meshStyle = {};
1053 self.surface.enabled = [];
1056 if self.type.is.scatter || self.type.is.lineScatter
1057 self.newprop(
"scatter",
struct());
1058 self.scatter.colorVariable = [];
1059 self.scatter.lineWidth = [];
1060 self.scatter.markeredgeColor = [];
1061 self.scatter.markerFaceColor = [];
1062 self.scatter.enabled = [];
1063 self.scatter.color = [];
1064 self.scatter.filled = [];
1065 self.scatter.marker = [];
1066 self.scatter.size = [];
1069 if self.type.is.scatter3 || self.type.is.lineScatter3
1070 self.newprop(
"scatter3",
struct());
1071 self.scatter3.colorVariable = [];
1072 self.scatter3.lineWidth = [];
1073 self.scatter3.markeredgeColor = [];
1074 self.scatter3.markerFaceColor = [];
1075 self.scatter3.enabled = [];
1076 self.scatter3.color = [];
1077 self.scatter3.filled = [];
1078 self.scatter3.marker = [];
1079 self.scatter3.size = [];
1082 %
if self.type.is.targetable
1083 % self.target = pm.vis.Target();
1086 if ~isempty(varargin)
1087 self.hash2comp(varargin); % parse arguments
1089 %self.premake(varargin{:}); % This is the subclass method!
1093 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1097 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1099 methods(Access =
public, Hidden)
1101 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1104 %> Configure the plot settings and specifications and
return nothing.<br>
1106 %> \param[inout] self : The input/output parent
object of
class [pm.vis.axes.Axes](@ref
Axes)
1107 %>
which is **implicitly** passed to
this dynamic method (not by the user).<br>
1108 %> \param[in] varargin : Any ``property, value`` pair of the parent
object.<br>
1109 %> If the
property is a ``
struct()``, then its value must be given as a cell array,
1110 %> with consecutive elements representing the
struct ``property-
name, property-value`` pairs.<br>
1111 %> Note that all of these property-value pairs can be also directly set via the
1112 %> parent
object attributes, before calling the ``premake()`` method.<br>
1114 %> \interface{premake}
1117 %> a = pm.vis.axes.Axes(ptype);
1119 %> a.premake(varargin);
1125 %> This method has side-effects by manipulating
1126 %> the existing attributes of the parent
object.<br>
1128 %> \example{premake}
1131 %> a = pm.vis.axes.Axes(
"line");
1132 %> a.premake(
"xlim", [0, 1])
1139 %> \FatemehBagheri, May 20 2024, 1:25 PM, NASA Goddard Space Flight Center (GSFC), Washington, D.C.<br>
1140 %> \AmirShahmoradi, May 16 2016, 9:03 AM, Oden Institute
for Computational Engineering and Sciences (ICES), UT Austin<br>
1141 function premake(self, varargin)
1143 if ~isempty(varargin)
1144 self.hash2comp(varargin); % parse arguments
1147 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1148 %%%% These settings must happen here so that they can be reset every time user nullifies the values.
1149 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1152 %%%% Set the enabled visualization components.
1155 if isprop(self,
"axes") && isempty(self.axes.enabled)
1156 self.axes.enabled = true;
1159 if isprop(self, "title") && isempty(self.title.enabled)
1160 self.title.enabled = ~isempty(self.title.titletext);
1163 if isprop(self, "xlabel") && isempty(self.xlabel.enabled)
1164 self.xlabel.enabled = true;
1167 if isprop(self, "ylabel") && isempty(self.ylabel.enabled)
1168 self.ylabel.enabled = true;
1171 if isprop(self, "zlabel") && isempty(self.zlabel.enabled)
1172 self.zlabel.enabled = true;
1175 if isprop(self, "colorbar") && isempty(self.colorbar.enabled)
1176 self.colorbar.enabled = true;
1179 if isprop(self, "colormap") && isempty(self.colormap.enabled)
1180 self.colormap.enabled = true;
1183 if isprop(self, "contour") && isempty(self.contour.enabled)
1184 self.contour.enabled = true;
1187 if isprop(self, "contourf") && isempty(self.contourf.enabled)
1188 self.contourf.enabled = true;
1191 if isprop(self, "contour3") && isempty(self.contour3.enabled)
1192 self.contour3.enabled = true;
1195 if isprop(self, "heatmap") && isempty(self.heatmap.enabled)
1196 self.heatmap.enabled = true;
1199 if isprop(self, "histfit") && isempty(self.histfit.enabled)
1200 self.histfit.enabled = true;
1203 if isprop(self, "histogram") && isempty(self.histogram.enabled)
1204 self.histogram.enabled = true;
1207 if isprop(self, "histogram2") && isempty(self.histogram2.enabled)
1208 self.histogram2.enabled = true;
1211 if isprop(self, "legend") && isempty(self.legend.enabled)
1212 self.legend.enabled = false;
1215 if isprop(self, "plot") && isempty(self.plot.enabled)
1216 self.plot.enabled = true;
1219 if isprop(self, "plot3") && isempty(self.plot3.enabled)
1220 self.plot3.enabled = true;
1223 if isprop(self, "scatter") && isempty(self.scatter.enabled)
1224 self.scatter.enabled = true;
1227 if isprop(self, "scatter3") && isempty(self.scatter3.enabled)
1228 self.scatter3.enabled = true;
1232 %%%% ensure line plots are monochromatic when there is scatter plot.
1235 if self.type.has.line
1236 if self.type.has.scatter && isempty(self.surface.enabled)
1237 self.surface.enabled = false;
1238 % if self.type.is.d2
1239 % self.plot.color = [];
1241 % self.plot3.color = [];
1243 elseif isempty(self.surface.enabled)
1244 self.surface.enabled = true;
1246 proplist = ["plot", "plot3"];
1248 if isprop(self, prop) && isempty(self.(prop).enabled)
1249 self.(prop).enabled = ~self.surface.enabled;
1255 %%%% Set heatmap settings.
1258 if self.type.is.heatmap
1259 if ~isempty(self.precision) && ~
isnumeric(self.precision)
1260 help("pm.vis.axes.
Axes");
1261 disp("self.precision");
1262 disp( self.precision );
1264 + "The specified precision must be a positive whole number." + newline ...
1265 + "For more information, see the documentation displayed above." + newline ...
1269 self.setKeyVal(self.type.
name, "colorbarVisible", "on");
1270 self.setKeyVal(self.type.
name, "missingDataColor", "[0.1500 0.1500 0.1500]");
1274 %%%% Set histfit/histogram/histogram2/contour/contour3/contourf settings.
1277 if self.type.is.histogram
1278 self.setKeyVal(self.type.
name, "edgeColor", "none");
1281 if self.type.is.histfit
1282 self.setKeyVal(self.type.
name, "dist", "Normal");
1283 self.setKeyVal(self.type.
name, "nbins", []);
1286 if self.type.is.histogram2
1287 self.setKeyVal(self.type.
name, "edgeColor", "none");
1288 self.setKeyVal(self.type.
name, "displayStyle", "bar3");
1289 self.setKeyVal(self.type.
name, "showEmptyBins", "off");
1290 %self.setKeyVal(self.type.
name, "numbins", [100 100]);
1291 if ~self.colormap.enabled
1292 if ~pm.introspection.
istype(self.histogram2.faceColor, "
string", 1)
1293 self.setKeyVal(self.type.
name, "faceColor", "auto");
1294 elseif self.histogram2.faceColor == "flat"
1295 % enforce monochrome by removing the colormapping.
1296 self.histogram2.faceColor = "auto";
1299 self.histogram2.faceColor = "flat";
1300 %self.setKeyVal(self.type.
name, "faceColor", "flat");
1304 if self.type.is.diffusion
1305 if self.type.is.contour3
1306 self.setKeyVal(self.type.
name, "color", []);
1307 self.setKeyVal(self.type.
name, "levels", 50);
1309 if self.type.is.contourf
1310 self.setKeyVal(self.type.
name, "color", "none");
1311 self.setKeyVal(self.type.
name, "edgecolor", "none");
1312 self.setKeyVal(self.type.
name, "levels", 50); % 8
1313 %if ~self.colormap.enabled && self.contourf.enabled
1314 % self.colormap.
map = flipud(gray);
1317 self.setKeyVal(self.type.
name, "levels", 10); % 8
1318 self.setKeyVal(self.type.
name, "color", []);
1321 self.setKeyVal("resolution", 2^9);
1322 self.setKeyVal("maxnoise", 0.001);
1323 self.setKeyVal(self.type.
name, "labelSpacing", 144);
1324 self.setKeyVal(self.type.
name, "showText", "off");
1325 self.setKeyVal(self.type.
name, "lineStyle", "-");
1326 self.setKeyVal(self.type.
name, "lineWidth", 0.5);
1330 %%%% Set line/scatter settings.
1333 if self.type.is.scatter || self.type.is.lineScatter
1334 self.setKeyVal("scatter", "size", 5);
1335 self.setKeyVal("scatter", "marker", "o");
1336 self.setKeyVal("scatter", "filled", true);
1337 if self.type.is.lineScatter && (self.scatter.enabled || self.colormap.enabled)
1338 self.setKeyVal("plot", "color", uint8([200 200 200 150]));
1342 if self.type.is.scatter3 || self.type.is.lineScatter3
1343 self.setKeyVal("scatter3", "size", 5);
1344 self.setKeyVal("scatter3", "marker", "o");
1345 self.setKeyVal("scatter3", "filled", true);
1346 if self.type.is.lineScatter3 && (self.scatter3.enabled || self.colormap.enabled)
1347 self.setKeyVal("plot3", "color", uint8([200 200 200 150]));
1351 if self.type.has.line
1352 if self.type.is.d2; self.setKeyVal("plot", "lineWidth", 1); end
1353 if self.type.is.d3; self.setKeyVal("plot3", "lineWidth", 1); end
1354 self.setKeyVal("surface", "faceColor", "none");
1355 self.setKeyVal("surface", "edgeColor", "flat");
1356 self.setKeyVal("surface", "edgeAlpha", 0.5);
1357 self.setKeyVal("surface", "lineStyle", "-");
1358 self.setKeyVal("surface", "lineWidth", 1);
1359 self.setKeyVal("surface", "marker", "none");
1363 %%%% Set the coloring settings.
1366 self.cenabled = false;
1367 self.cenabled = self.cenabled || (self.type.has.scatter && self.colormap.enabled);
1368 self.cenabled = self.cenabled || (self.type.has.line && self.surface.enabled && self.colormap.enabled);
1369 self.cenabled = self.cenabled || (self.type.is.histogram2 && self.colormap.enabled);
1370 self.cenabled = self.cenabled || (self.type.is.diffusion && self.colormap.enabled);
1371 self.cenabled = self.cenabled || (self.type.is.heatmap && self.colormap.enabled);
1373 % if ~self.cenabled && self.type.has.line
1374 % if self.type.is.d2; self.plot.enabled = true; end
1375 % if self.type.is.d3; self.plot3.enabled = true; end
1378 if isprop(self, "axes")
1379 if isfield(self.axes, "box") && isempty(self.axes.box); self.axes.box = "on"; end
1380 if isfield(self.axes, "xgrid") && isempty(self.axes.xgrid); self.axes.xgrid = "on"; end
1381 if isfield(self.axes, "ygrid") && isempty(self.axes.ygrid); self.axes.ygrid = "on"; end
1382 if isfield(self.axes, "zgrid") && isempty(self.axes.zgrid); self.axes.zgrid = "on"; end
1385 %if (self.type.is.diffusion || self.type.is.histogram2) && isempty(self.zlabel.txt)
1386 % self.zlabel.txt = "Density";
1391 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1394 %> Convert the components of the input component ``comp``
1395 %> of the parent
object into a cell array of key-val pairs.<br>
1398 %> This is a dynamic method of the class [pm.vis.axes.
Axes](@ref
Axes).<br>
1399 %> This method is used internally by the subclasses to convert the parent
object
1400 %> attributes to input arguments of MATLAB intrinsic visualization functions.<br>
1402 %> \param[inout] self : The input/output parent
object of class [pm.vis.axes.
Axes](@ref
Axes)
1403 %>
which is **implicitly** passed to this dynamic method (not by the user).<br>
1404 %> \param[in] comp : The input scalar MATLAB
string representing the
name of a ``struct``
1405 %> component of the parent
object, whose fields names and values are to
1406 %> be returned as subsequent pairs in the output ``hash`` cell array.<br>
1409 %> ``hash`` : The output cell array containing the pairs of ``field-
name, field-value``
1410 %> of the input MATLAB struct ``comp``.<br>
1412 %> \interface{comp2hash}
1415 %> a = pm.vis.axes.Axes(ptype);
1417 %> hash = a.comp2hash(comp);
1422 %> This method has side-effects by manipulating
1423 %> the existing attributes of the parent
object.<br>
1425 %> \example{comp2hash}
1428 %> a = pm.vis.axes.Axes(
"line",
"plot", {
"linewidth", 2})
1429 %> hash = a.comp2hash(
"plot")
1433 %> \final{comp2hash}
1436 %> \FatemehBagheri, May 20 2024, 1:25 PM, NASA Goddard Space Flight Center (GSFC), Washington, D.C.<br>
1437 %> \AmirShahmoradi, May 16 2016, 9:03 AM, Oden Institute
for Computational Engineering and Sciences (ICES), UT Austin<br>
1438 function hash = comp2hash(self, comp)
1440 excludes = {
"enabled"};
1441 if strcmp(comp,
"axes")
1442 excludes = [excludes(:); "labels"; "parent"; "ncol"; "nrow"];
1443 elseif strcmp(comp, "colorbar")
1444 excludes = [excludes(:); "width"; "height"];
1445 elseif strcmp(comp, "colormap")
1446 excludes = [excludes(:); "
map"];
1447 elseif strcmp(comp, "contour3") || strcmp(comp, "contourf") || strcmp(comp, "contour")
1448 % "color" is a keyword, but we set it as an explicit argument.
1449 excludes = [excludes(:); "levels"; "lineSpec"; "color"];
1450 %elseif strcmp(comp, "heatmap")
1451 % excludes = [excludes(:)];
1452 elseif strcmp(comp, "histfit")
1453 excludes = [excludes(:); "dist"; "nbins"];
1454 elseif strcmp(comp, "histogram")
1455 excludes = [excludes(:); "edges"; "nbins"];
1456 elseif strcmp(comp, "histogram2")
1457 excludes = [excludes(:); "nbins"; "xedges"; "yedges"];
1458 elseif strcmp(comp, "legend")
1459 excludes = [excludes(:); "labels"];
1460 elseif strcmp(comp, "plot") || strcmp(comp, "plot3")
1461 excludes = [excludes(:); "size"]; % color;
1462 elseif strcmp(comp, "scatter") || strcmp(comp, "scatter3")
1463 excludes = [excludes(:); "marker"; "filled"; "color"; "size"];
1464 elseif strcmp(comp, "surface")
1465 excludes = [excludes(:); "color"; "size"];
1466 elseif strcmp(comp, "title")
1467 excludes = [excludes(:); "titletext"; "subtitletext"];
1468 elseif strcmp(comp, "xlabel") || strcmp(comp, "ylabel") || strcmp(comp, "zlabel")
1469 excludes = [excludes(:); "txt"];
1470 elseif ~strcmp(comp, "heatmap")
1474 + "Internal library error: Unrecognized MATLAB function
name" + newline ...
1475 + "as ``comp`` argument of
object of class [pm.vis.axes.
Axes](@ref
Axes)." + newline ...
1481 hash = pm.matlab.hashmap.
struct2hash(self.(comp), excludes, unique, onlyfull);
1484 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1488 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
function name(in vendor)
Return the MPI library name as used in naming the ParaMonte MATLAB shared libraries.
function list()
Return a list of MATLAB strings containing the names of OS platforms supported by the ParaMonte MATLA...
This is the class for generating instances of objects that contain the specifications of various type...
function premake(in self, in varargin)
Configure the plot settings and specifications and return nothing.
function comp2hash(in self, in comp)
Convert the components of the input component comp of the parent object into a cell array of key-val ...
function Axes(in ptype, in varargin)
Construct and return an object of class pm.vis.axes.Axes.
function reset(in self, in varargin)
Reset the properties of the plot to the original default settings and return nothing.
This is the base class for generating subclass of MATLAB handle superclass whose annoying methods are...
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 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 ...
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...
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...
function clean()
Remove all paths that contain the ParaMonte lib directory from the MATLAB path variable.
function isnumeric(in str)
Return a scalar MATLAB logical that is true if and only if the input string can be converted to a sca...
function istype(in varval, in vartype, in varsize)
Return true if and only if the input varval conforms with the specified input type vartype and the sp...
function map()
Return a scalar MATLAB logical that is true if and only if the current installation of MATLAB contain...
function struct2hash(in object, in exkeys, in unique, in onlyfull)
Return a hashmap cell array containing all field names and field values of input scalar MATLAB object...
function which(in vendor)
Return the a MATLAB string containing the path to the first mpiexec executable binary found in system...