Mercurial > repos > public > sbplib
comparison spyh.m @ 361:4a5d83324ec1 feature/hypsyst
Meged with default
author | Ylva Rydin <ylva.rydin@telia.com> |
---|---|
date | Thu, 08 Dec 2016 13:38:04 +0100 |
parents | 5cb99f56f55e |
children | 12db86a8ec7b |
comparison
equal
deleted
inserted
replaced
356:9567a9dd220d | 361:4a5d83324ec1 |
---|---|
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 |