[Eeglablist] plotcurve.m - error in setting ordinate limits
Ramón Martinez
nucleuscub at gmail.com
Fri May 31 07:10:08 PDT 2019
Dear John,
Thanks for taking a time to look into this issue. However, a better channel
to go over this is by submitting a bug report to
https://github.com/sccn/eeglab/issues.
We would need to reproduce the issue first. By reading the code it seems to
me weird that the function falls into that line when the *ylim* input is a
two-element vector. Let's follow up on that.
Thanks,
Ramon
On Fri, May 31, 2019 at 1:11 PM Johnson, John T. <john.johnson at gatech.edu>
wrote:
> In plotcurve.m, line 215, there is an attempt to set the y limits of the
> plot, but the variables used have more elements than expected.
>
> % ordinate limits
> % ---------------
> if isempty(g.ylim),
> yll = min(reshape(R, [1 prod(size(R))]));
> ylh = max(reshape(R, [1 prod(size(R))]));
> yll2 = yll - (ylh-yll)/10;
> ylh2 = ylh + (ylh-yll)/10;
> if ~isnan(yll), g.ylim = [yll2 ylh2]; end
> end
> if ~isempty(g.ylim) && length(g.ylim) == 2
> if any(g.ylim)
> ylim(g.ylim);
> else
> ylim([0 1]);
> axis off;
> box off;
> end
> elseif ~isempty(g.ylim)
> yl = ylim;
> ylim([g.ylim yl(2)]); <———— Error
> end
> yl = ylim;
>
>
> The error message is Error using ylim (line 31) Limits must be a 2-element
> vector of increasing numeric values.
> Inspecting g.ylim shows that it has four elements, rather than the
> expected single element.
>
> To work around the error, I can do this:
>
> elseif ~isempty(g.ylim)
> yl = ylim;
> yl_min = min([g.ylim yl]);
> yl_max = max([g.ylim yl]);
> ylim([yl_min yl_max]);
> end
> yl = ylim;
>
>
> But the lower limit is too low. Is there a better option?
>
> This happens in both 13.6.5b and 2019.0.
>
> Thanks,
> John
> _______________________________________________
> Eeglablist page: http://sccn.ucsd.edu/eeglab/eeglabmail.html
> To unsubscribe, send an empty email to
> eeglablist-unsubscribe at sccn.ucsd.edu
> For digest mode, send an email with the subject "set digest mime" to
> eeglablist-request at sccn.ucsd.edu
--
_____________________________________________________
Ramon Martinez-Cancino
Swartz Center for Computational Neuroscience
Institute for Neural Computation, University of California San Diego
More information about the eeglablist
mailing list