Skip to content
Snippets Groups Projects
Commit e672d88d authored by Houtan Bastani's avatar Houtan Bastani
Browse files

reporting: @graph: uistack fix for octave & move zeroline writing up

parent aed73f7a
No related branches found
No related tags found
No related merge requests found
...@@ -65,6 +65,16 @@ if ~isempty(o.yrange) ...@@ -65,6 +65,16 @@ if ~isempty(o.yrange)
ylim(o.yrange); ylim(o.yrange);
end end
if o.zeroline
a = ylim;
if 0 > a(1) && 0 < a(2)
lh = line(xlim, [0 0], 'color', 'k', 'LineWidth', 0.25);
children =get(gca(), 'children');
children = [children(2:end); lh];
set(gca(), 'children', children);
end
end
if ~isempty(o.shade) if ~isempty(o.shade)
x1 = find(strcmpi(o.shade(1).format(), xlabels)); x1 = find(strcmpi(o.shade(1).format(), xlabels));
x2 = find(strcmpi(o.shade(o.shade.ndat).format(), xlabels)); x2 = find(strcmpi(o.shade(o.shade.ndat).format(), xlabels));
...@@ -101,14 +111,6 @@ end ...@@ -101,14 +111,6 @@ end
if ~isempty(o.title) if ~isempty(o.title)
title( o.title, 'Interpreter', 'LaTex'); title( o.title, 'Interpreter', 'LaTex');
end end
if o.zeroline
a = ylim;
if 0 > a(1) && 0 < a(2)
lh = line(xlim, [0 0], 'color', 'k', 'LineWidth', 0.25);
uistack(lh, 'bottom');
end
end
drawnow; drawnow;
o.figname = [tempname '.tex']; o.figname = [tempname '.tex'];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment