A question regarding "subaxis" function

Hello,
I am trying to create subplots with specified vertical and horizontal spacings. I tried the "subaxis" function and I faced an error:
Error in subaxis (line 41)
Args=parseArgs(varargin,Args,{'Holdaxis'},{'Spacing'
{'sh','sv'}; 'Padding' {'pl','pr','pt','pb'}; 'Margin'
{'ml','mr','mt','mb'}});
Here is the link for the function:
Also, I tried the "subtightplot" function and faced another error:
Error in subtightplot (line 56)
h=subplot('Position',pos_vec,varargin{:});
Link for the "subtightplot" is:
I spent much time trying to fix both errors but I couldn't, any help please?
Regards,
Amr

4 个评论

@Amr Mahmoud: please show us the complete error message. This means all of the red text.
When beginners randomly edit their error messages before posting in their question then they remove useful information that we need to understand what the problem is.
Also: what MATLAB version are you using?
Hi Stephen,
My version is Matlab R2015b.
The complete error for the subaxis function is:
Undefined function 'parseArgs' for input arguments of type
'cell'.
Error in subaxis (line 41)
Args=parseArgs(varargin,Args,{'Holdaxis'},{'Spacing'
{'sh','sv'}; 'Padding' {'pl','pr','pt','pb'}; 'Margin'
{'ml','mr','mt','mb'}});
Error in rect_patttern (line 17)
subaxis(max(size(periodx)),2,kk, 'Spacing', 0.03,
'Padding', 0, 'Margin', 0);
Whereas the error for the "subtightplot" function is:
Error using matlab.graphics.axis.Axes/set
Invalid input argument type to 'set'. Type 'help set' for
options.
Error in subplot (line 489)
set(ax, pvpairs{:});
Error in subtightplot (line 56)
h=subplot('Position',pos_vec,varargin{:});
Error in posr (line 3)
subtightplot(2,3,1, 0.03,0.01, 0, 0);
I fixed the problem, it was a problem with one of the functions. Thanks.
Hii Amr,
Can you please share how did you fix this problem.

请先登录,再进行评论。

回答(0 个)

产品

版本

R2015b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by