FAST and EASY data plotting for Python, NumPy and Qt

Announcing PyQwt-0.29.91 FAST and EASY data plotting for Python, NumPy and Qt PyQwt is a set of Python bindings for the Qwt C++ class library. The Qwt library extend the Qt framework with widgets for Scientific and Engineering applications. It contains QwtPlot, a 2d plotting widget, and widgets for data input/output such as and QwtCounter, QwtKnob, QwtThermo and QwtWheel. PyQwt requires and extends PyQt, a set of Python bindings for Qt. PyQwt requires NumPy. NumPy extends the Python language with new data types that make Python an ideal language for numerical computing and experimentation (like MatLab, but better). The home page of PyQwt is http://gerard.vermeulen.free.fr NEW in PyQwt-0.29.91: 1. compatible with PyQt-2.5/sip-2.5 and PyQt-2.4/sip-2.4. 2. compatible with NumPy-20.2.0, and lower. 3. *.exe installer for Windows (requires Qt-2.3.0-NC). 4. build instructions for Windows and other versions of Qt. 5. HTML documentation with installation instructions and a reference listing the Python calls to PyQwt that are different from the corresponding C++ calls to Qwt. 6. fixed reference counting bug in the methods with NumPy arrays as arguments. 7. new methods: QwtPlot.axisMargins() QwtPlot.closestCurve() QwtPlot.curveKeys() QwtPlot.markerKeys() QwtPlot.title() QwtPlot.titleFont() QwtScale.labelFormat() QwtScale.map() 8. changed methods: QwtCurve.verifyRange() -- cleaned up interface QwtPlot.adjust() -- is now fully implemented QwtPlot.enableLegend() -- (de)selects all items or a single item 9. removed methods (incompatible with Python, because unsafe, even in C++): QwtCurve.setRawData() QwtPlot.setCurveRawData() QwtSpline.copyValues() Gerard Vermeulen

Hi all, I was recently surprised to find that there are no round(0 or abs() Ufuncs with Numeric. I'm imagining that they might exist under other names, but if not, I submit my versions for critique (lightly tested) -Chris from Numeric import * def Uabs(a): """ A Ufunc version of the Python abs() function """ a = asarray(a) if a.typecode() == 'D' or a.typecode() == 'F':# for complex numbers return sqrt(a.imag**2 + a.real**2) else: return where(a < 0, -a, a) def Uround(a,n=0): """ A Ufunc version of the Python round() function. It should behave in the same way Note: I think this is the right thing to do for negative numbers, but not totally sure. (Uround(-0.5) = 0, but Uround(-0.5000001) = -1) It won't work for complex numbers """ a = asarray(a) n = asarray(n) return floor((a * 10.**n) + 0.5) / 10.**n -- Christopher Barker, Ph.D. ChrisHBarker@home.net --- --- --- http://members.home.net/barkerlohmann ---@@ -----@@ -----@@ ------@@@ ------@@@ ------@@@ Oil Spill Modeling ------ @ ------ @ ------ @ Water Resources Engineering ------- --------- -------- Coastal and Fluvial Hydrodynamics -------------------------------------- ------------------------------------------------------------------------

Chris Barker wrote:
OK, Tim Hochberg was nice enough to point out to me that abs() works on NumPy arrays. However, it does not work on other sequences, so maybe we need this: def abs(a): return abs(asarray(a)) -Chris -- Christopher Barker, Ph.D. ChrisHBarker@home.net --- --- --- http://members.home.net/barkerlohmann ---@@ -----@@ -----@@ ------@@@ ------@@@ ------@@@ Oil Spill Modeling ------ @ ------ @ ------ @ Water Resources Engineering ------- --------- -------- Coastal and Fluvial Hydrodynamics -------------------------------------- ------------------------------------------------------------------------

Hi all, I was recently surprised to find that there are no round(0 or abs() Ufuncs with Numeric. I'm imagining that they might exist under other names, but if not, I submit my versions for critique (lightly tested) -Chris from Numeric import * def Uabs(a): """ A Ufunc version of the Python abs() function """ a = asarray(a) if a.typecode() == 'D' or a.typecode() == 'F':# for complex numbers return sqrt(a.imag**2 + a.real**2) else: return where(a < 0, -a, a) def Uround(a,n=0): """ A Ufunc version of the Python round() function. It should behave in the same way Note: I think this is the right thing to do for negative numbers, but not totally sure. (Uround(-0.5) = 0, but Uround(-0.5000001) = -1) It won't work for complex numbers """ a = asarray(a) n = asarray(n) return floor((a * 10.**n) + 0.5) / 10.**n -- Christopher Barker, Ph.D. ChrisHBarker@home.net --- --- --- http://members.home.net/barkerlohmann ---@@ -----@@ -----@@ ------@@@ ------@@@ ------@@@ Oil Spill Modeling ------ @ ------ @ ------ @ Water Resources Engineering ------- --------- -------- Coastal and Fluvial Hydrodynamics -------------------------------------- ------------------------------------------------------------------------

Chris Barker wrote:
OK, Tim Hochberg was nice enough to point out to me that abs() works on NumPy arrays. However, it does not work on other sequences, so maybe we need this: def abs(a): return abs(asarray(a)) -Chris -- Christopher Barker, Ph.D. ChrisHBarker@home.net --- --- --- http://members.home.net/barkerlohmann ---@@ -----@@ -----@@ ------@@@ ------@@@ ------@@@ Oil Spill Modeling ------ @ ------ @ ------ @ Water Resources Engineering ------- --------- -------- Coastal and Fluvial Hydrodynamics -------------------------------------- ------------------------------------------------------------------------
participants (4)
-
Chris Barker
-
Gerard Vermeulen
-
John J. Lee
-
Robert Kern