Mercurial > repos > public > sbplib
comparison spyh.m @ 358:5cb99f56f55e
Added some utility functions. Improved some documentation.
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Mon, 05 Dec 2016 13:31:57 +0100 |
parents | |
children | 12db86a8ec7b |
comparison
equal
deleted
inserted
replaced
303:f18142c1530b | 358:5cb99f56f55e |
---|---|
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 |