[hdf-compass] 85/295: Remove pylab usage.
Ghislain Vaillant
ghisvail-guest at moszumanska.debian.org
Sun May 8 10:35:29 UTC 2016
This is an automated email from the git hooks/post-receive script.
ghisvail-guest pushed a commit to branch debian/master
in repository hdf-compass.
commit 43621566c1de68a1035611a5b225d1b2e3023f29
Author: Elliott Sales de Andrade <quantum.analyst at gmail.com>
Date: Tue Jul 21 03:04:00 2015 -0400
Remove pylab usage.
Pylab has been deprecated by matplotlib for a very long time now.
---
compass_viewer/array/plot.py | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/compass_viewer/array/plot.py b/compass_viewer/array/plot.py
index 21a32db..91ef567 100644
--- a/compass_viewer/array/plot.py
+++ b/compass_viewer/array/plot.py
@@ -17,6 +17,7 @@ Matplotlib window with toolbar.
import numpy as np
import wx
+import matplotlib.pyplot as plt
from matplotlib.figure import Figure
from matplotlib.backends.backend_wxagg import \
FigureCanvasWxAgg as FigCanvas, \
@@ -85,8 +86,6 @@ class ContourPlotFrame(PlotFrame):
PlotFrame.__init__(self, data, title)
def draw_figure(self):
- import pylab
-
maxElements = 500 # don't attempt plot more than 500x500 elements
rows = self.data.shape[0]
cols = self.data.shape[1]
@@ -96,4 +95,4 @@ class ContourPlotFrame(PlotFrame):
xx = np.arange(0, self.data.shape[1], col_stride)
yy = np.arange(0, self.data.shape[0], row_stride)
out = self.axes.contourf(xx, yy, data, 25)
- pylab.colorbar(out)
+ plt.colorbar(out)
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/hdf-compass.git
More information about the debian-science-commits
mailing list