Skip to content

Commit

Permalink
Adding eqlims.m
Browse files Browse the repository at this point in the history
  • Loading branch information
shanqing-cai committed Aug 11, 2013
1 parent 772ea50 commit df8b25e
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions eqlims.m
@@ -0,0 +1,16 @@
function eqlims(varargin)
xs = get(gca, 'XLim');
ys = get(gca, 'YLim');
lims = [min([xs(1), ys(1)]), max([xs(2), ys(2)])];

if ~isempty(fsic(varargin, 'line'))
plot(lims, lims, '-', 'Color', [0.5, 0.5, 0.5]);
end

if ~isempty(fsic(varargin, 'grid'))
grid on;
end

set(gca, 'XLim', lims, 'YLim', lims);
axis square;
return

0 comments on commit df8b25e

Please sign in to comment.