[python-dtcwt] 361/497: plotting: remove hold(...) calls
Ghislain Vaillant
ghisvail-guest at moszumanska.debian.org
Tue Jul 21 18:06:28 UTC 2015
This is an automated email from the git hooks/post-receive script.
ghisvail-guest pushed a commit to branch debian/sid
in repository python-dtcwt.
commit 221a2c0a432520235f1992a81480cd45d1a495f8
Author: Rich Wareham <rjw57 at cam.ac.uk>
Date: Fri Feb 7 14:55:10 2014 +0000
plotting: remove hold(...) calls
The hold(True) calls weren't necessary and the hold(False) call actually
changed the default hold state of matplotlib which could lead to some
strange results.
---
dtcwt/plotting.py | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/dtcwt/plotting.py b/dtcwt/plotting.py
index c45e0cc..5c1635f 100644
--- a/dtcwt/plotting.py
+++ b/dtcwt/plotting.py
@@ -50,8 +50,7 @@ def overlay_quiver_DTCWT(image, vectorField, level, offset):
# Make sure imshow() uses the full range of greyscale values
imshow(image, cmap=cm.gray, clim=(0,255))
- hold(True)
-
+
# Set up the grid for the quiver plot
g1 = np.kron(np.arange(0, vectorField[:,:,0].shape[0]).T, np.ones((1,vectorField[:,:,0].shape[1])))
g2 = np.kron(np.ones((vectorField[:,:,0].shape[0], 1)), np.arange(0, vectorField[:,:,0].shape[1]))
@@ -60,13 +59,11 @@ def overlay_quiver_DTCWT(image, vectorField, level, offset):
cmap = cm.spectral
scalefactor = np.max(np.max(np.max(np.max(np.abs(vectorField)))))
vectorField[-1,-1,:] = scalefactor
-
+
for sb in range(0, vectorField.shape[2]):
- hold(True)
thiscolour = cmap(sb / float(vectorField.shape[2])) # Select colour for this subband
hq = quiver(g2*(2**level) + offset*(2**level), g1*(2**level) + offset*(2**level), np.real(vectorField[:,:,sb]), \
np.imag(vectorField[:,:,sb]), color=thiscolour, scale=scalefactor*2**level)
quiverkey(hq, 1.05, 0.9-0.05*sb, 0, "subband " + np.str(sb), coordinates='axes', color=thiscolour, labelcolor=thiscolour, labelpos='E')
- hold(False)
return hq
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/python-dtcwt.git
More information about the debian-science-commits
mailing list