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>
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
SubplotContour),
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;
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 =
public)
629 %> The scalar MATLAB logical (Boolean) indicator
which is ``
false`` by
default.<br>
630 %> If it is set to ``
true``, it will silence all output postprocessing
631 %> messages (except warnings and errors).<br>
636 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
638 properties(Access =
public, Hidden)
642 %> An auxiliary MATLAB ``
struct`` containing plot type information.
645 %> This is an internal ``Hidden``
class attribute
646 %> that is inaccessible to the end users.<br>
652 %> An auxiliary scalar MATLAB ``logical`` that is
true if plot is color-mapped.
655 %> This is an internal ``Hidden``
class attribute
656 %> that is inaccessible to the end users.<br>
661 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
663 methods(Access =
public)
665 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
668 %> Construct and
return an
object of
class [pm.vis.axes.Axes](@ref
Axes).<br>
671 %> This function is the constructor of the
class [pm.vis.axes.Axes](@ref
Axes).<br>
672 %> For more information, see the documentation of the
class [pm.vis.axes.Axes](@ref
Axes).<br>
674 %> \param[in] ptype : The input scalar MATLAB
string containing the
name of the
675 %> subclass that whose parent is
Axes (e.g.,
"heatmap").<br>
676 %> Supported plot names are:<br>
680 %> <li> ``
"scatter"``
681 %> <li> ``
"scatter3"``
682 %> <li> ``
"lineScatter"``
683 %> <li> ``
"lineScatter3"``
684 %> <li> ``
"histogram2"``
685 %> <li> ``
"histogram"``
686 %> <li> ``
"contour3"``
687 %> <li> ``
"contourf"``
688 %> <li> ``
"contour"``
689 %> <li> ``
"histfit"``
690 %> <li> ``
"heatmap"``
693 %> \param[in] varargin : Any ``property, value`` pair of the
object.<br>
694 %> If the
property is a ``
struct()``, then its value must be given as a cell array,
695 %> with consecutive elements representing the
struct ``property-
name, property-value`` pairs.<br>
696 %> Note that all of these property-value pairs can be also directly set via the
697 %> parent
object attributes, before calling the ``premake()`` method.<br>
700 %> ``self`` : The output scalar
object of
class [pm.vis.axes.Axes](@ref
Axes).<br>
705 %> axes = pm.vis.axes.
Axes(ptype);
710 %> \include{lineno} example/vis/axes/
Axes/main.m
712 %> \include{lineno} example/vis/axes/
Axes/main.out.m
717 %> \JoshuaOsborne, May 21 2024, 5:59 AM, University of Texas at Arlington<br>
718 %> \FatemehBagheri, May 20 2024, 1:25 PM, NASA Goddard Space Flight Center (GSFC), Washington, D.C.<br>
719 %> \AmirShahmoradi, May 16 2016, 9:03 AM, Oden Institute
for Computational Engineering and Sciences (ICES), UT Austin<br>
720 function self =
Axes(ptype, varargin)
722 if nargin < 1 || ~pm.introspection.istype(ptype,
"string", 1) || ~pm.array.len(ptype)
723 help(
"pm.vis.axes.Axes");
725 +
"The input argument ``ptype`` is missing." + newline ...
726 +
"For more information, see the class documentation displayed above." + newline ...
730 % lower the first character.
731 ptype = string(ptype);
732 ptype{1} = lower(ptype{1});
735 self.type =
struct();
736 self.type.name = ptype;
737 pnamel = lower(ptype);
738 self.type.is.line = strcmpi(pnamel,
"line" );
739 self.type.is.line3 = strcmpi(pnamel,
"line3" );
740 self.type.is.scatter = strcmpi(pnamel,
"scatter" );
741 self.type.is.scatter3 = strcmpi(pnamel,
"scatter3" );
742 self.type.is.lineScatter = strcmpi(pnamel,
"lineScatter" );
743 self.type.is.lineScatter3 = strcmpi(pnamel,
"lineScatter3");
744 self.type.is.histogram2 = strcmpi(pnamel,
"histogram2" );
745 self.type.is.histogram = strcmpi(pnamel,
"histogram" );
746 self.type.is.contour3 = strcmpi(pnamel,
"contour3" );
747 self.type.is.contourf = strcmpi(pnamel,
"contourf" );
748 self.type.is.contour = strcmpi(pnamel,
"contour" );
749 self.type.is.heatmap = strcmpi(pnamel,
"heatmap" );
750 self.type.is.histfit = strcmpi(pnamel,
"histfit" );
751 self.type.is.diffusion = self.type.is.contour || self.type.is.contourf || self.type.is.contour3;
752 self.type.is.density = self.type.is.diffusion || self.type.is.histfit || self.type.is.histogram || self.type.is.histogram2;
753 self.type.is.d3 = self.type.is.line3 || self.type.is.scatter3 || self.type.is.lineScatter3;
754 self.type.is.d1 = self.type.is.histfit || self.type.is.histogram || self.type.is.heatmap;
755 self.type.is.d2 = ~(self.type.is.d1 || self.type.is.d3);
756 self.type.is.triaxes = self.type.is.d3 || self.type.is.histogram2 || self.type.is.contour3;
757 %self.type.is.targetable =
false; %xx ~self.type.is.heatmap && ~ self.type.is.d3;
758 self.type.has.line = self.type.is.line || self.type.is.line3 || self.type.is.lineScatter || self.type.is.lineScatter3;
759 self.type.has.scatter = self.type.is.scatter || self.type.is.scatter3 || self.type.is.lineScatter || self.type.is.lineScatter3;
761 self.reset(varargin{:}); % This is the subclass method!
765 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
768 %> Reset the properties of the plot to the original
default settings and
return nothing.<br>
771 %> Use
this method when you change many attributes of the plot and
772 %> you want to
clean up and go back to the
default settings.<br>
774 %> \param[inout] self : The input/output parent
object of
class [pm.vis.axes.Axes](@ref
Axes)
775 %>
which is **implicitly** passed to
this dynamic method (not by the user).<br>
776 %> \param[in] varargin : Any ``property, value`` pair of the parent
object.<br>
777 %> If the
property is a ``
struct()``, then its value must be given as a cell array,
778 %> with consecutive elements representing the
struct ``property-
name, property-value`` pairs.<br>
779 %> Note that all of these property-value pairs can be also directly set via the
780 %> parent
object attributes.<br>
785 %> a = pm.vis.axes.Axes(ptype)
787 %> a.reset(varargin) % reset the plot to settings in ``varargin`` and the rest to
default.
788 %> a.reset() % reset the plot to the
default settings.
795 %> \FatemehBagheri, May 20 2024, 1:25 PM, NASA Goddard Space Flight Center (GSFC), Washington, D.C.<br>
796 %> \AmirShahmoradi, May 16 2016, 9:03 AM, Oden Institute
for Computational Engineering and Sciences (ICES), UT Austin<br>
797 function reset(self, varargin)
799 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
800 %%%% RULE 0: Any non-MATLAB-
default setting must be preferably set in the premake() method to override user null values.
801 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
809 if ~self.type.is.heatmap
810 self.newprop("axes", struct());
812 self.axes.color = [];
813 self.axes.colorScale = [];
814 self.axes.fontName = [];
815 self.axes.fontSize = fontSize_def;
816 self.axes.fontSizeMode = [];
817 self.axes.fontSmoothing = [];
818 self.axes.fontWeight = [];
819 self.axes.xgrid = [];
820 self.axes.ygrid = [];
821 if self.type.is.triaxes
822 self.axes.zgrid = [];
824 self.axes.enabled = [];
831 self.newprop("title", struct());
832 if ~self.type.is.heatmap
833 self.title.fontSize = fontSize_def;
834 self.title.interpreter = [];
835 self.title.fontWeight = [];
836 self.title.color = []; %[0, 0, 0];
838 self.title.enabled = [];
839 self.title.titletext = [];
840 if ~self.type.is.heatmap
841 self.title.subtitletext = [];
848 self.newprop("xlabel", struct());
849 if ~self.type.is.heatmap
850 self.xlabel.color = []; %[0.15, 0.15, 0.15];
851 self.xlabel.fontAngle = [];
852 self.xlabel.fontSize = fontSize_def;
853 self.xlabel.fontWeight = [];
854 self.xlabel.interpreter = [];
855 self.xlabel.rotation = [];
856 self.newprop("xscale", []);
857 self.newprop("xlim", []);
859 self.xlabel.enabled = [];
860 self.xlabel.txt = [];
866 self.newprop("ylabel", self.xlabel);
867 if ~self.type.is.heatmap
868 self.newprop("yscale", []);
869 self.newprop("ylim", []);
876 if self.type.is.triaxes
877 self.newprop("zlabel", self.xlabel);
878 self.newprop("zlim", []);
879 self.newprop("zscale", []);
883 %%%% colc, colorbar, colormap
886 if self.type.is.heatmap || ~self.type.is.d1
888 if self.type.has.line || self.type.has.scatter
889 self.newprop("colc", {});
892 if ~self.type.is.heatmap
893 self.newprop(
"colorbar",
struct());
894 self.colorbar.fontSize = fontSize_def;
895 self.colorbar.direction =
'normal';
896 self.colorbar.limits = [];
897 self.colorbar.location =
'eastoutside';
898 self.colorbar.ticks = [];
899 self.colorbar.tickLabels = [];
900 self.colorbar.tickLabelInterpreter =
'tex';
901 self.colorbar.enabled = [];
904 self.newprop(
"colormap",
struct());
905 self.colormap.enabled = [];
906 self.colormap.map = []; %
'default'
914 if ~self.type.is.heatmap
915 self.newprop(
"legend",
struct());
916 self.legend.box =
'off';
917 self.legend.color =
'none';
918 self.legend.fontSize = fontSize_def;
919 self.legend.interpreter =
'none';
920 self.legend.location = [];
921 self.legend.numColumns = [];
922 self.legend.textColor = [];
923 self.legend.enabled = [];
924 self.legend.labels = {};
931 %
if ~self.type.is.targetable
932 % self.newprop(
"target");
936 %%%% heatmap attributes
939 if self.type.is.heatmap
940 self.newprop(
"heatmap",
struct());
941 self.newprop(
"precision", []);
942 self.heatmap.colorbarVisible = [];
943 self.heatmap.colorLimits = [];
944 self.heatmap.missingDataColor = [];
945 self.heatmap.fontName = [];
946 self.heatmap.fontSize = fontSize_def;
947 self.heatmap.enabled = [];
951 %%%% density attributes
954 if self.type.is.histfit
955 self.newprop(
"histfit",
struct());
956 self.histfit.enabled = [];
957 self.histfit.dist = [];
958 self.histfit.nbins = [];
961 if self.type.is.histogram
962 self.newprop(
"histogram",
struct());
963 self.histogram.binLimitsMode = [];
964 self.histogram.binMethod = [];
965 self.histogram.binWidth = [];
966 self.histogram.displayStyle = [];
967 self.histogram.edgeAlpha = [];
968 self.histogram.edgeColor = [];
969 self.histogram.faceAlpha = [];
970 self.histogram.faceColor = [];
971 self.histogram.lineStyle = [];
972 self.histogram.lineWidth = [];
973 self.histogram.normalization = [];
974 self.histogram.orientation = [];
975 self.histogram.enabled = [];
976 self.histogram.edges = [];
977 self.histogram.nbins = [];
980 if self.type.is.histogram2
981 self.newprop(
"histogram2",
struct());
982 self.histogram2.binWidth = [];
983 self.histogram2.xbinLimits = [];
984 self.histogram2.xbinLimitsMode = [];
985 self.histogram2.ybinLimits = [];
986 self.histogram2.ybinLimitsMode = [];
987 self.histogram2.binMethod = [];
988 self.histogram2.showEmptyBins = [];
989 self.histogram2.normalization = [];
990 self.histogram2.displayStyle = [];
991 self.histogram2.edgeAlpha = [];
992 self.histogram2.edgeColor = [];
993 self.histogram2.faceAlpha = [];
994 self.histogram2.faceColor = [];
995 self.histogram2.faceLighting = [];
996 self.histogram2.lineStyle = [];
997 self.histogram2.lineWidth = [];
998 self.histogram2.enabled = [];
999 self.histogram2.nbins = [];
1000 self.histogram2.xedges = [];
1001 self.histogram2.yedges = [];
1004 if self.type.is.contour || self.type.is.contourf || self.type.is.contour3
1005 self.newprop(
"resolution", 2^9);
1006 self.newprop(
"maxnoise", 0.001);
1009 if self.type.is.contour
1010 self.newprop(
"contour",
struct());
1011 self.contour.color = [];
1012 self.contour.labelSpacing = [];
1013 self.contour.lineWidth = [];
1014 self.contour.showText = [];
1015 self.contour.enabled = [];
1016 self.contour.levels = [];
1017 self.contour.lineSpec = [];
1020 if self.type.is.contourf
1021 self.newprop(
"contourf",
struct());
1022 self.contourf.edgecolor = [];
1023 self.contourf.color = [];
1024 self.contourf.labelSpacing = [];
1025 self.contourf.lineWidth = [];
1026 self.contourf.showText = [];
1027 self.contourf.enabled = [];
1028 self.contourf.levels = [];
1029 self.contourf.lineSpec = [];
1032 if self.type.is.contour3
1033 self.newprop(
"contour3",
struct());
1034 self.contour3.color = [];
1035 self.contour3.labelSpacing = [];
1036 self.contour3.lineWidth = [];
1037 self.contour3.showText = [];
1038 self.contour3.enabled = [];
1039 self.contour3.levels = [];
1040 self.contour3.lineSpec = [];
1044 %%%% line/scatter attributes
1047 if self.type.is.line || self.type.is.lineScatter
1048 self.newprop(
"surface",
struct());
1049 self.newprop(
"plot",
struct());
1050 self.plot.color = [];
1051 self.plot.lineWidth = [];
1052 self.plot.lineStyle = [];
1053 self.plot.markeredgeColor = [];
1054 self.plot.markerFaceColor = [];
1055 self.plot.markerIndices = [];
1056 self.plot.markerSize = [];
1057 self.plot.enabled = [];
1060 if self.type.is.line3 || self.type.is.lineScatter3
1061 self.newprop(
"surface",
struct());
1062 self.newprop(
"plot3",
struct());
1063 self.plot3.color = {};
1064 self.plot3.lineWidth = {};
1065 self.plot3.lineStyle =
'-';
1066 self.plot3.markeredgeColor = [];
1067 self.plot3.markerFaceColor = [];
1068 self.plot3.markerIndices = [];
1069 self.plot3.markerSize = [];
1070 self.plot3.enabled = [];
1073 if isprop(self,
"surface")
1074 self.surface.alignVertexCenters = {};
1075 self.surface.backFaceLighting = {};
1076 self.surface.edgeAlpha = {};
1077 self.surface.edgeColor = {};
1078 self.surface.edgeLighting = {};
1079 self.surface.faceAlpha = {};
1080 self.surface.faceColor = {};
1081 self.surface.faceLighting = {};
1082 self.surface.lineStyle = {};
1083 self.surface.lineWidth = {};
1084 self.surface.marker = {};
1085 self.surface.markerEdgeColor = {};
1086 self.surface.markerFaceColor = {};
1087 self.surface.markerSize = {};
1088 self.surface.meshStyle = {};
1089 self.surface.enabled = [];
1092 if self.type.is.scatter || self.type.is.lineScatter
1093 self.newprop(
"scatter",
struct());
1094 self.scatter.colorVariable = [];
1095 self.scatter.lineWidth = [];
1096 self.scatter.markeredgeColor = [];
1097 self.scatter.markerFaceColor = [];
1098 self.scatter.enabled = [];
1099 self.scatter.color = [];
1100 self.scatter.filled = [];
1101 self.scatter.marker = [];
1102 self.scatter.size = [];
1105 if self.type.is.scatter3 || self.type.is.lineScatter3
1106 self.newprop(
"scatter3",
struct());
1107 self.scatter3.colorVariable = [];
1108 self.scatter3.lineWidth = [];
1109 self.scatter3.markeredgeColor = [];
1110 self.scatter3.markerFaceColor = [];
1111 self.scatter3.enabled = [];
1112 self.scatter3.color = [];
1113 self.scatter3.filled = [];
1114 self.scatter3.marker = [];
1115 self.scatter3.size = [];
1118 %
if self.type.is.targetable
1119 % self.target = pm.vis.Target();
1122 if ~isempty(varargin)
1123 self.hash2comp(varargin); % parse arguments
1125 %self.premake(varargin{:}); % This is the subclass method!
1129 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1133 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1135 methods(Access =
public, Hidden)
1137 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1140 %> Configure the plot settings and specifications and
return nothing.<br>
1142 %> \param[inout] self : The input/output parent
object of
class [pm.vis.axes.Axes](@ref
Axes)
1143 %>
which is **implicitly** passed to
this dynamic method (not by the user).<br>
1144 %> \param[in] varargin : Any ``property, value`` pair of the parent
object.<br>
1145 %> If the
property is a ``
struct()``, then its value must be given as a cell array,
1146 %> with consecutive elements representing the
struct ``property-
name, property-value`` pairs.<br>
1147 %> Note that all of these property-value pairs can be also directly set via the
1148 %> parent
object attributes, before calling the ``premake()`` method.<br>
1150 %> \interface{premake}
1153 %> a = pm.vis.axes.Axes(ptype);
1155 %> a.premake(varargin);
1161 %> This method has side-effects by manipulating
1162 %> the existing attributes of the parent
object.<br>
1164 %> \example{premake}
1167 %> a = pm.vis.axes.Axes(
"line");
1168 %> a.premake(
"xlim", [0, 1])
1175 %> \FatemehBagheri, May 20 2024, 1:25 PM, NASA Goddard Space Flight Center (GSFC), Washington, D.C.<br>
1176 %> \AmirShahmoradi, May 16 2016, 9:03 AM, Oden Institute
for Computational Engineering and Sciences (ICES), UT Austin<br>
1177 function premake(self, varargin)
1179 if ~isempty(varargin)
1180 self.hash2comp(varargin); % parse arguments
1183 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1184 %%%% These settings must happen here so that they can be reset every time user nullifies the values.
1185 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1188 %%%% Set the enabled visualization components.
1191 if isprop(self,
"axes") && isempty(self.axes.enabled)
1192 self.axes.enabled = true;
1195 if isprop(self, "title") && isempty(self.title.enabled)
1196 self.title.enabled = ~isempty(self.title.titletext);
1199 if isprop(self, "xlabel") && isempty(self.xlabel.enabled)
1200 self.xlabel.enabled = true;
1203 if isprop(self, "ylabel") && isempty(self.ylabel.enabled)
1204 self.ylabel.enabled = true;
1207 if isprop(self, "zlabel") && isempty(self.zlabel.enabled)
1208 self.zlabel.enabled = true;
1211 if isprop(self, "colorbar") && isempty(self.colorbar.enabled)
1212 self.colorbar.enabled = true;
1215 if isprop(self, "colormap") && isempty(self.colormap.enabled)
1216 self.colormap.enabled = true;
1219 if isprop(self, "contour") && isempty(self.contour.enabled)
1220 self.contour.enabled = true;
1223 if isprop(self, "contourf") && isempty(self.contourf.enabled)
1224 self.contourf.enabled = true;
1227 if isprop(self, "contour3") && isempty(self.contour3.enabled)
1228 self.contour3.enabled = true;
1231 if isprop(self, "heatmap") && isempty(self.heatmap.enabled)
1232 self.heatmap.enabled = true;
1235 if isprop(self, "histfit") && isempty(self.histfit.enabled)
1236 self.histfit.enabled = true;
1239 if isprop(self, "histogram") && isempty(self.histogram.enabled)
1240 self.histogram.enabled = true;
1243 if isprop(self, "histogram2") && isempty(self.histogram2.enabled)
1244 self.histogram2.enabled = true;
1247 if isprop(self, "legend") && isempty(self.legend.enabled)
1248 self.legend.enabled = false;
1251 if isprop(self, "plot") && isempty(self.plot.enabled)
1252 self.plot.enabled = true;
1255 if isprop(self, "plot3") && isempty(self.plot3.enabled)
1256 self.plot3.enabled = true;
1259 if isprop(self, "scatter") && isempty(self.scatter.enabled)
1260 self.scatter.enabled = true;
1263 if isprop(self, "scatter3") && isempty(self.scatter3.enabled)
1264 self.scatter3.enabled = true;
1268 %%%% ensure line plots are monochromatic when there is scatter plot.
1271 if self.type.has.line
1272 if self.type.has.scatter && isempty(self.surface.enabled)
1273 self.surface.enabled = false;
1274 % if self.type.is.d2
1275 % self.plot.color = [];
1277 % self.plot3.color = [];
1279 elseif isempty(self.surface.enabled)
1280 self.surface.enabled = true;
1282 proplist = ["plot", "plot3"];
1284 if isprop(self, prop) && isempty(self.(prop).enabled)
1285 self.(prop).enabled = ~self.surface.enabled;
1291 %%%% Set heatmap settings.
1294 if self.type.is.heatmap
1295 if ~isempty(self.precision) && ~
isnumeric(self.precision)
1296 help("pm.vis.axes.
Axes");
1297 disp("self.precision");
1298 disp( self.precision );
1300 + "The specified precision must be a positive whole number." + newline ...
1301 + "For more information, see the documentation displayed above." + newline ...
1305 self.setKeyVal(self.type.
name, "colorbarVisible", "on");
1306 self.setKeyVal(self.type.
name, "missingDataColor", "[0.1500 0.1500 0.1500]");
1310 %%%% Set histfit/histogram/histogram2/contour/contour3/contourf settings.
1313 if self.type.is.histogram
1314 self.setKeyVal(self.type.
name, "edgeColor", "none");
1317 if self.type.is.histfit
1318 self.setKeyVal(self.type.
name, "dist", "Normal");
1319 self.setKeyVal(self.type.
name, "nbins", []);
1322 if self.type.is.histogram2
1323 self.setKeyVal(self.type.
name, "edgeColor", "none");
1324 self.setKeyVal(self.type.
name, "displayStyle", "bar3");
1325 self.setKeyVal(self.type.
name, "showEmptyBins", "off");
1326 %self.setKeyVal(self.type.
name, "numbins", [100 100]);
1327 if ~self.colormap.enabled
1328 if ~pm.introspection.
istype(self.histogram2.faceColor, "
string", 1)
1329 self.setKeyVal(self.type.
name, "faceColor", "auto");
1330 elseif self.histogram2.faceColor == "flat"
1331 % enforce monochrome by removing the colormapping.
1332 self.histogram2.faceColor = "auto";
1335 self.histogram2.faceColor = "flat";
1336 %self.setKeyVal(self.type.
name, "faceColor", "flat");
1340 if self.type.is.diffusion
1341 if self.type.is.contour3
1342 self.setKeyVal(self.type.
name, "color", []);
1343 self.setKeyVal(self.type.
name, "levels", 50);
1345 if self.type.is.contourf
1346 self.setKeyVal(self.type.
name, "color", "none");
1347 self.setKeyVal(self.type.
name, "edgecolor", "none");
1348 self.setKeyVal(self.type.
name, "levels", 50); % 8
1349 %if ~self.colormap.enabled && self.contourf.enabled
1350 % self.colormap.
map = flipud(gray);
1353 self.setKeyVal(self.type.
name, "levels", 10); % 8
1354 self.setKeyVal(self.type.
name, "color", []);
1357 self.setKeyVal("resolution", 2^9);
1358 self.setKeyVal("maxnoise", 0.001);
1359 self.setKeyVal(self.type.
name, "labelSpacing", 144);
1360 self.setKeyVal(self.type.
name, "showText", "off");
1361 self.setKeyVal(self.type.
name, "lineStyle", "-");
1362 self.setKeyVal(self.type.
name, "lineWidth", 0.5);
1366 %%%% Set line/scatter settings.
1369 if self.type.is.scatter || self.type.is.lineScatter
1370 self.setKeyVal("scatter", "size", 5);
1371 self.setKeyVal("scatter", "marker", "o");
1372 self.setKeyVal("scatter", "filled", true);
1373 if self.type.is.lineScatter && (self.scatter.enabled || self.colormap.enabled)
1374 self.setKeyVal("plot", "color", uint8([200 200 200 150]));
1378 if self.type.is.scatter3 || self.type.is.lineScatter3
1379 self.setKeyVal("scatter3", "size", 5);
1380 self.setKeyVal("scatter3", "marker", "o");
1381 self.setKeyVal("scatter3", "filled", true);
1382 if self.type.is.lineScatter3 && (self.scatter3.enabled || self.colormap.enabled)
1383 self.setKeyVal("plot3", "color", uint8([200 200 200 150]));
1387 if self.type.has.line
1388 if self.type.is.d2; self.setKeyVal("plot", "lineWidth", 1); end
1389 if self.type.is.d3; self.setKeyVal("plot3", "lineWidth", 1); end
1390 self.setKeyVal("surface", "faceColor", "none");
1391 self.setKeyVal("surface", "edgeColor", "flat");
1392 self.setKeyVal("surface", "edgeAlpha", 0.5);
1393 self.setKeyVal("surface", "lineStyle", "-");
1394 self.setKeyVal("surface", "lineWidth", 1);
1395 self.setKeyVal("surface", "marker", "none");
1399 %%%% Set the coloring settings.
1402 self.cenabled = false;
1403 self.cenabled = self.cenabled || (self.type.has.scatter && self.colormap.enabled);
1404 self.cenabled = self.cenabled || (self.type.has.line && self.surface.enabled && self.colormap.enabled);
1405 self.cenabled = self.cenabled || (self.type.is.histogram2 && self.colormap.enabled);
1406 self.cenabled = self.cenabled || (self.type.is.diffusion && self.colormap.enabled);
1407 self.cenabled = self.cenabled || (self.type.is.heatmap && self.colormap.enabled);
1409 % if ~self.cenabled && self.type.has.line
1410 % if self.type.is.d2; self.plot.enabled = true; end
1411 % if self.type.is.d3; self.plot3.enabled = true; end
1414 if isprop(self, "axes")
1415 if isfield(self.axes, "box") && isempty(self.axes.box); self.axes.box = "on"; end
1416 if isfield(self.axes, "xgrid") && isempty(self.axes.xgrid); self.axes.xgrid = "on"; end
1417 if isfield(self.axes, "ygrid") && isempty(self.axes.ygrid); self.axes.ygrid = "on"; end
1418 if isfield(self.axes, "zgrid") && isempty(self.axes.zgrid); self.axes.zgrid = "on"; end
1421 %if (self.type.is.diffusion || self.type.is.histogram2) && isempty(self.zlabel.txt)
1422 % self.zlabel.txt = "Density";
1427 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1430 %> Convert the components of the input component ``comp``
1431 %> of the parent
object into a cell array of key-val pairs.<br>
1434 %> This is a dynamic method of the class [pm.vis.axes.
Axes](@ref
Axes).<br>
1435 %> This method is used internally by the subclasses to convert the parent
object
1436 %> attributes to input arguments of MATLAB intrinsic visualization functions.<br>
1438 %> \param[inout] self : The input/output parent
object of class [pm.vis.axes.
Axes](@ref
Axes)
1439 %>
which is **implicitly** passed to this dynamic method (not by the user).<br>
1440 %> \param[in] comp : The input scalar MATLAB
string representing the
name of a ``struct``
1441 %> component of the parent
object, whose fields names and values are to
1442 %> be returned as subsequent pairs in the output ``hash`` cell array.<br>
1445 %> ``hash`` : The output cell array containing the pairs of ``field-
name, field-value``
1446 %> of the input MATLAB struct ``comp``.<br>
1448 %> \interface{comp2hash}
1451 %> a = pm.vis.axes.Axes(ptype);
1453 %> hash = a.comp2hash(comp);
1458 %> This method has side-effects by manipulating
1459 %> the existing attributes of the parent
object.<br>
1461 %> \example{comp2hash}
1464 %> a = pm.vis.axes.Axes(
"line",
"plot", {
"linewidth", 2})
1465 %> hash = a.comp2hash(
"plot")
1469 %> \final{comp2hash}
1472 %> \FatemehBagheri, May 20 2024, 1:25 PM, NASA Goddard Space Flight Center (GSFC), Washington, D.C.<br>
1473 %> \AmirShahmoradi, May 16 2016, 9:03 AM, Oden Institute
for Computational Engineering and Sciences (ICES), UT Austin<br>
1474 function hash = comp2hash(self, comp)
1476 excludes = {
"enabled"};
1477 if strcmp(comp,
"axes")
1478 excludes = [excludes(:); "labels"; "parent"; "ncol"; "nrow"];
1479 elseif strcmp(comp, "colorbar")
1480 excludes = [excludes(:); "width"; "height"];
1481 elseif strcmp(comp, "colormap")
1482 excludes = [excludes(:); "
map"];
1483 elseif strcmp(comp, "contour3") || strcmp(comp, "contourf") || strcmp(comp, "contour")
1484 % "color" is a keyword, but we set it as an explicit argument.
1485 excludes = [excludes(:); "levels"; "lineSpec"; "color"];
1486 %elseif strcmp(comp, "heatmap")
1487 % excludes = [excludes(:)];
1488 elseif strcmp(comp, "histfit")
1489 excludes = [excludes(:); "dist"; "nbins"];
1490 elseif strcmp(comp, "histogram")
1491 excludes = [excludes(:); "edges"; "nbins"];
1492 elseif strcmp(comp, "histogram2")
1493 excludes = [excludes(:); "nbins"; "xedges"; "yedges"];
1494 elseif strcmp(comp, "legend")
1495 excludes = [excludes(:); "labels"];
1496 elseif strcmp(comp, "plot") || strcmp(comp, "plot3")
1497 excludes = [excludes(:); "size"]; % color;
1498 elseif strcmp(comp, "scatter") || strcmp(comp, "scatter3")
1499 excludes = [excludes(:); "marker"; "filled"; "color"; "size"];
1500 elseif strcmp(comp, "surface")
1501 excludes = [excludes(:); "color"; "size"];
1502 elseif strcmp(comp, "title")
1503 excludes = [excludes(:); "titletext"; "subtitletext"];
1504 elseif strcmp(comp, "xlabel") || strcmp(comp, "ylabel") || strcmp(comp, "zlabel")
1505 excludes = [excludes(:); "txt"];
1506 elseif ~strcmp(comp, "heatmap")
1510 + "Internal library error: Unrecognized MATLAB function
name" + newline ...
1511 + "as ``comp`` argument of
object of class [pm.vis.axes.
Axes](@ref
Axes)." + newline ...
1517 hash = pm.matlab.hashmap.
struct2hash(self.(comp), excludes, unique, onlyfull);
1520 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1524 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
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...
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...