comparison spyh.m @ 363:8c8fd649bae3

Merge default heads.
author Martin Almquist <martin.almquist@it.uu.se>
date Tue, 20 Dec 2016 15:36:29 +0100
parents 5cb99f56f55e
children 12db86a8ec7b
comparison
equal deleted inserted replaced
362:ded4156e53e2 363:8c8fd649bae3
1 % spyh mimics the built in spy but returns a handle which allows modifying the plot.
2 function h = spyh(A)
3 [n,m] = size(A);
4 [I,J] = find(A);
5
6 h = plot(J,I);
7 h.LineStyle = 'none';
8 h.Marker = '.';
9 h.MarkerSize = 14;
10
11 a = gca;
12 xlim([0 m+1]);
13 ylim([0 n+1]);
14 axis square
15 a.YDir = 'reverse';
16 end