Gerard Vermeulen | 1 Jun 14:10 2008
Picon

ANN: PyQwt-5.1.0 released

What is PyQwt ( http://pyqwt.sourceforge.net ) ?

- it is a set of Python bindings for the Qwt C++ class library which
  extends the Qt framework with widgets for scientific and engineering
  applications.   It provides a 2-dimensional plotting widget and
  various widgets to display and control bounded or unbounded floating
  point values.

- it requires and extends PyQt, a set of Python bindings for Qt.

- it supports the use of PyQt, Qt, Qwt, and optionally NumPy or SciPy
  in a GUI Python application or in an interactive Python session.

- it runs on POSIX, Mac OS X and Windows platforms (practically any
  platform supported by Qt and Python).

- it plots fast: fairly good hardware allows a rate of 100,000
points/second. (PyQwt with Qt-3 is faster than with Qt-4).

- it is licensed under the GPL with an exception to allow dynamic
linking with non-free releases of Qt and PyQt. 

The most important new features of PyQwt-5.1.0 are:
- support for Qwt-5.1.0.
- support for PyQt-4.4.2 and SIP-4.7.6.
- support for Qt-4.4.
- the CartesianDemo.py, MaskedDataDemo.py, PickerDemo.py examples.

The most important bug fixes in PyQwt-5.1.0 are:
- fixed QwtPicker::stateMachine() to allow for subclassing of QwtPicker
(Continue reading)

Klaus Schneider | 2 Jun 13:47 2008
Picon

Re: QwtScaleWidget has wrong scale

Dear Uwe,

> The rectangle for the colorbar is calculated in
> QwtScaleWidget::colorBarRect(). If you look (debug) into its implementation
> you might see why your rect is too large.

Thanks very much for your hint. I compared what the spectrogram demo and my 
code did and found that the Qwt code sets the border dist, so I added the 
following after setting up the scale widget:
   scale->getBorderDistHint(border1, border2);
   scale->setBorderDist(border1, border2);
and now it works perfectly!

In the documentation of getBorderDistHint() it says that you need that to make 
the tics fit, but I just didn't find that method in the haystack of available 
methods and classes; I didn't think that you had to explicitly set the 
borders to make it fit and thus looked at the wrong places. What about adding 
a hint in the QwtScaleWidget's main class description?

Thanks again,
Klaus
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
qwt-interest mailing list
(Continue reading)

Joey Mukherjee | 4 Jun 23:36 2008

Autoscaling and Log axes

With the recent versions of Qwt (including the recent trunk), when I  
draw my plots, one of my axes are not drawn if the axis is auto  
scaled and logarithmic.  If the axis is not auto scaled, or is linear  
(either auto scaled or not), the axis is drawn fine.

Here is a snippet of how I am creating my axis:

     QwtScaleEngine *se = NULL;
     if (axis.GetIsLog () == true)
         se = new QwtLog10ScaleEngine ();
     else se = new QwtLinearScaleEngine ();

     _qwtplot->setAxisScaleDraw (axisId, new ScaleDraw);
     se->setAttribute (QwtScaleEngine::Floating, true);
     _qwtplot->setAxisScaleEngine (axisId, se);
     if (axis.GetIsAutoScaled () == false) {
         _qwtplot->setAxisScale (axisId, axis.GetLower (),  
axis.GetUpper ());
     }

I could swear this use to work fine.

Any ideas?

Thanks,
Joey

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
(Continue reading)

Joey Mukherjee | 5 Jun 00:14 2008

Re: Autoscaling and Log axes

Oops.  Ok, I figured out why I have my problem and it was my fault.   
Sorry for the noise...

However, the real problem I have is the log scale, when it is  
floating and autoscaled, will hang for a very long time given a large  
range in the limits, but still not over a decade.

Here is how I fixed it:

Index: qwt_scale_engine.cpp
===================================================================
--- qwt_scale_engine.cpp        (revision 406)
+++ qwt_scale_engine.cpp        (working copy)
 <at>  <at>  -655,8 +655,12  <at>  <at> 
          interval = buildInterval(interval.minValue());

      stepSize = divideInterval(log10(interval).width(), qwtMax 
(maxNumSteps, 1));
-    if ( stepSize < 1.0 )
-        stepSize = 1.0;
+    if ( stepSize < 1.0 ) {
+        if (interval.maxValue() / interval.minValue() < 10.0)
+            stepSize = divideInterval(interval.width(), qwtMax 
(maxNumSteps, 1));
+        else stepSize = 1.0;
+    }

      if (!testAttribute(QwtScaleEngine::Floating))
          interval = align(interval, stepSize);

(Continue reading)

E.R. | 6 Jun 12:17 2008
Picon

AutoScale with a fixed Minimum?

Hej,

is it possible to set the minimum scale factor to zero and the upper
bound is set bei AutoScale?

For example:setAxisScale(QwtPlot::yLeft, 0, auto, 0)

Thx, Christian

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
Matthias Reich | 6 Jun 13:17 2008
Picon

QwtData derivative for large, fixed datasets

Dear all,

I'm facing the task of plotting potentially large datasets, which are 
not generated on the fly, but pre-loaded into memory with x and y values 
(and z for the case of spectrograms). I've written classes to deal with 
that issue by adding local variables which are simply handed back to the 
user via the x() and y() data access routines.

For large sets of data (10 seconds at 2 MHz, i.e. 20 Msamples x,y pairs) 
this creates a very noticeable performance impact for plotting, 
especially when combined with zooming and panning.

Has anyone done a similar thing and got around the limitation of having 
to call x() and y() for each and every point yet ?

I'd be thankful for any suggestions on where to start (even if only 
possible in the library) to improve things.

Cheers,
Matthias Reich
---------------------------------------------------------------------
  MPI/IPP, Bereich E1, ASDEX Upgrade   |  <at> : Matthias.Reich <at> ipp.mpg.de
  IPP Homepage: http://www.ipp.mpg.de/ | Tel.: (+49)(0)89-3299-1868
---------------------------------------------------------------------

PS: class TimeSeriesData:

// the constructors just copy the data found at the pointers into local 
member variables.

(Continue reading)

Markus | 6 Jun 18:26 2008
Picon
Picon

Using a Pixmap as Needle in qwt_compass

Hello

Beginner needs help:

i was trying, without success, to use a pixmap which is generated at runtime, in
drawing a QwtDialNeedle, basically like this:

a) .h
--------------------------------
class QWT_EXPORT QwtMySymbol: public QwtDialNeedle
{
public:

    QwtMySymbol(QImage image, const QColor &light = Qt::red,
        const QColor &dark = Qt::gray);

    virtual void draw(QPainter *, const QPoint &, int length,
        double direction, QPalette::ColorGroup = QPalette::Active) const;

    static void drawMyNeedle(QPainter *, 
        const QPalette &, QPalette::ColorGroup,
        const QPoint &, int length, double direction);
private:
  QImage image;
};

b) .cpp
--------------------------------
QwtMySymbol::QwtMySymbol(QImage image,
        const QColor &light, const QColor &dark): image(image)
(Continue reading)

Uwe Rathmann | 7 Jun 12:02 2008
Picon

Re: AutoScale with a fixed Minimum?

On Friday 06 June 2008 12:17, E.R. wrote:

> is it possible to set the minimum scale factor to zero and the upper
> bound is set bei AutoScale?

No, but you can overload YourPlot::replot and do your own autoscaling there.

Uwe

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
Uwe Rathmann | 7 Jun 12:06 2008
Picon

Re: QwtData derivative for large, fixed datasets

On Friday 06 June 2008 13:17, Matthias Reich wrote:

> Has anyone done a similar thing and got around the limitation of having
> to call x() and y() for each and every point yet ?

I'm sure this is none of the bottleneck of your application. Better 
investigate in strategies, that reduce the number of points that need to be 
painted: f.e. something like level of details.

Uwe

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
Uwe Rathmann | 7 Jun 12:11 2008
Picon

Re: Using a Pixmap as Needle in qwt_compass

On Friday 06 June 2008 18:26, Markus wrote:

> Now I get the error message " invalid use of member ‘QwtMySymbol::image’ in
> static member function"

This is a compiler message meaning, that you can't acess a non-static member 
in a static member function. But this is basic C++ knowledge and has nothing 
to do with Qwt or Qt.

Uwe

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
qwt-interest mailing list
qwt-interest <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/qwt-interest

Gmane