Ormond, Randy | 1 Aug 2008 17:09

Getting min and max scale values

Hello,

 

I’m looking for a way to get the current min and max values for an axis.  I’m writing a dialog to let a user change the min and/or max values for the x and y axes. Is there a way to get the current values so I can put them in the four (xmin, xmax, ymin, ymax) dialog fields?

 

Forgive me if I’m dense, but I didn’t see any access methods like this.

 

Thanks,

Randy

256-319-6627

 

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
qwt-interest mailing list
qwt-interest <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/qwt-interest
Darryl Wallace | 1 Aug 2008 17:16
Picon
Favicon

Re: Getting min and max scale values


Ormond, Randy wrote:
>
> Hello,
>
> I’m looking for a way to get the current min and max values for an 
> axis. I’m writing a dialog to let a user change the min and/or max 
> values for the x and y axes. Is there a way to get the current values 
> so I can put them in the four (xmin, xmax, ymin, ymax) dialog fields?
>
I'm usually a Python user so I'll spare the C++ syntax.

For your plot use the method "axisScaleDiv(int axisid)", supplying it 
with the axis you want information from and it returns a pointer to the 
QwtScaleDiv of the axis.

Then call lBound() for lower bound and hBound() for higher bound of the 
QwtScaleDiv.

I subclassed the QwtPlot and gave it a convenience method 
"getAxisLimts(axis)" that returns both limits for you.

darryl

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
David Stranz | 1 Aug 2008 17:20

RE: Getting min and max scale values

Hi Randy,
 
Try pPlot->axisScaleDiv( axisId )->lBound() and ->hBound()
 
Regards,
 
David
 

_______________________________________________________________
David Stranz, Ph.D.     david_stranz <at> MassSpec.com

Sierra Analytics, Inc.
5815 Stoddard Road, Suite 601
Modesto, CA  95356

Tel: (209) 545-8508
http://www.massspec.com
_______________________________________________________________

 

From: qwt-interest-bounces <at> lists.sourceforge.net [mailto:qwt-interest-bounces <at> lists.sourceforge.net] On Behalf Of Ormond, Randy
Sent: Friday, August 01, 2008 8:09 AM
To: qwt-interest <at> lists.sourceforge.net
Subject: Getting min and max scale values

Hello,

 

I’m looking for a way to get the current min and max values for an axis.  I’m writing a dialog to let a user change the min and/or max values for the x and y axes. Is there a way to get the current values so I can put them in the four (xmin, xmax, ymin, ymax) dialog fields?

 

Forgive me if I’m dense, but I didn’t see any access methods like this.

 

Thanks,

Randy

256-319-6627

 

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
qwt-interest mailing list
qwt-interest <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/qwt-interest
Ormond, Randy | 1 Aug 2008 17:26

RE: Getting min and max scale values

Darryl,

Thanks! That looks like just what I need.

Randy
256-319-6627
-----Original Message-----
From: qwt-interest-bounces <at> lists.sourceforge.net
[mailto:qwt-interest-bounces <at> lists.sourceforge.net] On Behalf Of Darryl
Wallace
Sent: Friday, August 01, 2008 10:16 AM
To: List for both Qwt users and developers
Subject: Re: Getting min and max scale values

Ormond, Randy wrote:
>
> Hello,
>
> I'm looking for a way to get the current min and max values for an 
> axis. I'm writing a dialog to let a user change the min and/or max 
> values for the x and y axes. Is there a way to get the current values 
> so I can put them in the four (xmin, xmax, ymin, ymax) dialog fields?
>
I'm usually a Python user so I'll spare the C++ syntax.

For your plot use the method "axisScaleDiv(int axisid)", supplying it 
with the axis you want information from and it returns a pointer to the 
QwtScaleDiv of the axis.

Then call lBound() for lower bound and hBound() for higher bound of the 
QwtScaleDiv.

I subclassed the QwtPlot and gave it a convenience method 
"getAxisLimts(axis)" that returns both limits for you.

darryl

------------------------------------------------------------------------
-
This SF.Net email is sponsored by the Moblin Your Move Developer's
challenge
Build the coolest Linux based applications with Moblin SDK & win great
prizes
Grand prize is a trip for two to an Open Source event anywhere in the
world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
qwt-interest mailing list
qwt-interest <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/qwt-interest

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
Ormond, Randy | 1 Aug 2008 17:26

RE: Getting min and max scale values

David,

 

Thank you very much.

 

Randy

256-319-6627

From: qwt-interest-bounces <at> lists.sourceforge.net [mailto:qwt-interest-bounces <at> lists.sourceforge.net] On Behalf Of David Stranz
Sent: Friday, August 01, 2008 10:20 AM
To: 'List for both Qwt users and developers'
Subject: RE: Getting min and max scale values

 

Hi Randy,

 

Try pPlot->axisScaleDiv( axisId )->lBound() and ->hBound()

 

Regards,

 

David

 

_______________________________________________________________
David Stranz, Ph.D.     david_stranz <at> MassSpec.com

Sierra Analytics, Inc.
5815 Stoddard Road, Suite 601
Modesto, CA  95356

Tel: (209) 545-8508
http://www.massspec.com
_______________________________________________________________

 

 

From: qwt-interest-bounces <at> lists.sourceforge.net [mailto:qwt-interest-bounces <at> lists.sourceforge.net] On Behalf Of Ormond, Randy
Sent: Friday, August 01, 2008 8:09 AM
To: qwt-interest <at> lists.sourceforge.net
Subject: Getting min and max scale values

Hello,

 

I’m looking for a way to get the current min and max values for an axis.  I’m writing a dialog to let a user change the min and/or max values for the x and y axes. Is there a way to get the current values so I can put them in the four (xmin, xmax, ymin, ymax) dialog fields?

 

Forgive me if I’m dense, but I didn’t see any access methods like this.

 

Thanks,

Randy

256-319-6627

 

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
qwt-interest mailing list
qwt-interest <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/qwt-interest
Joey Mukherjee | 4 Aug 2008 19:58
Favicon

Re: Alignment of QwtPlotScaleItem with axis

On Wed, Jul 30, 2008 at 12:05 AM, Uwe Rathmann <Uwe.Rathmann <at> tigertal.de> wrote:

I couldn't reproduce the problem. So I'm afraid you need to send me the code
of a small application, demonstrating the problem.

I've had a hard time reproducing this problem in a small sample program, so I did some more debugging and found out this:

If I comment out the "replot()" in QwtPlot::polish (which is the whole routine basically), all the ticks are lined up okay.  However, any zooming that is done causes the ticks to get out of line again.  

If I apply this patch:

--- src/qwt_plot_scaleitem.cpp  (revision 391)
+++ src/qwt_plot_scaleitem.cpp  (working copy)
<at> <at> -476,6 +476,6 <at> <at>
     }
 
     QwtScaleDiv scaleDiv = d_data->scaleDraw->scaleDiv();
-    scaleDiv.setInterval(interval);
+//    scaleDiv.setInterval(interval);
     d_data->scaleDraw->setScaleDiv(scaleDiv);
 }

everything is okay.  Basically, the interval it has is perfectly fine, yet it is the recomputation of the interval that causes it to fail.  

Maybe it is tied to the zooming of the axes in that they are not getting updated?  I have my own zooming classes which descend from QwtPlotZoomer, but the only code I am only overloading the widgetMouseReleaseEvent and the trackerText. 

Anyway, does that give any clues of what might be wrong or what else I can check?  

Thanks,
Joey
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
qwt-interest mailing list
qwt-interest <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/qwt-interest
Igor | 5 Aug 2008 09:34
Picon

Re: Trouble compiling Qwt 5.1.1 with Qt 4.4.0

When compiling 5.2 SVN I get lot of errors like this:

c:\qwt\qwt-5.2svn\qwt\src\qwt_series_data.h(373) : error C2960: 'QVector<T>' : i
nconsistent explicit instantiations, a previous explicit instantiation specified
 'extern template'
        with
        [
            T=QPointF
        ]
qwt_plot_intervalcurve.cpp
c:\qwt\qwt-5.2svn\qwt\src\qwt_series_data.h(373) : error C2960: 'QVector<T>' : i
nconsistent explicit instantiations, a previous explicit instantiation specified
 'extern template'
        with
        [
            T=QPointF
        ]
qwt_plot_printfilter.cpp
c:\qwt\qwt-5.2svn\qwt\src\qwt_series_data.h(373) : error C2960: 'QVector<T>' : i
nconsistent explicit instantiations, a previous explicit instantiation specified
 'extern template'
        with
        [
            T=QPointF
        ]

What does that mean?

Igor

Rainer Thaden pravi:
Hi Igor,
I get a lot of unresolved external symbol errors when trying to compile 5.1.1 with qt 4.4.0. What can I try to solve this? I had to recompile qt commercial because of application linking errors with VS.NET 2008. Recompiling solved this issue. Is this now causing issues with Qwt?
I have Qt4.4.0 commercial, recompiled (as static lib) under VC++2005. Qwt5.1.1 compiles and links nicely with that. Don't know if that helps you. Regards, Rainer ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ qwt-interest mailing list qwt-interest <at> lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/qwt-interest

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
qwt-interest mailing list
qwt-interest <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/qwt-interest
Uwe Rathmann | 5 Aug 2008 20:20
Picon

Re: Trouble compiling Qwt 5.1.1 with Qt 4.4.0

On Tuesday 05 August 2008 09:34, Igor wrote:

> When compiling 5.2 SVN I get lot of errors like this:

You had asked for 5.1.1 !

> c:\qwt\qwt-5.2svn\qwt\src\qwt_series_data.h(373) : error C2960:
> 'QVector<T>' : i
> nconsistent explicit instantiations, a previous explicit instantiation
> specified
>  'extern template'
>         with
>         [
>             T=QPointF
>         ]
> What does that mean?

This problem has already been reported here: 
http://sourceforge.net/tracker/index.php?func=detail&aid=1948333&group_id=13693&atid=113693

If you tell me where the previous explicit instantiation happens ( I don't use 
Windows myself) I will try to fix it.

Uwe

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
Uwe Rathmann | 6 Aug 2008 07:39
Picon

Re: Alignment of QwtPlotScaleItem with axis

On Monday 04 August 2008 19:58, Joey Mukherjee wrote:

> Anyway, does that give any clues of what might be wrong or what else I can
> check?

The geometry of a QwtPlotScaleItem is updated each time it is painted. Try to 
debug QwtPlotScaleItem::draw: maybe the most interesting part is to compare 
the QwtScaleMaps (xMap/yMap vs. sd->map() ) after(!)  d_data->scaleDraw has 
been updated.

Uwe

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
Igor | 6 Aug 2008 08:36
Picon

Re: Trouble compiling Qwt 5.1.1 with Qt 4.4.0

Hello! Thank you very much for your answer. Yes, the first time I wrote about 5.1.1, but I tried 5.2SVN because 5.1.1 did not link. I tried now again and *miracle* now it links. But when I try to load plugin in VS 2008 I get message:

The plugin 'C:/Program Files/Trolltech/Qt VS Integration/plugins/qwt_designer_plugin5.dll' uses incompatible Qt library. Expected build key "Windows msvc release full-config", got "Windows msvc release full-config no-stl"

Does that mean I must recompile Qt with STL enabled? So does Qwt require STL enabled?

In regard to 5.2SVN: how to tell you where previous explicit instantiation happens?

Thank you again,
Igor


Uwe Rathmann pravi:
On Tuesday 05 August 2008 09:34, Igor wrote:
When compiling 5.2 SVN I get lot of errors like this:
You had asked for 5.1.1 !
c:\qwt\qwt-5.2svn\qwt\src\qwt_series_data.h(373) : error C2960: 'QVector<T>' : i nconsistent explicit instantiations, a previous explicit instantiation specified 'extern template' with [ T=QPointF ] What does that mean?
This problem has already been reported here: http://sourceforge.net/tracker/index.php?func=detail&aid=1948333&group_id=13693&atid=113693 If you tell me where the previous explicit instantiation happens ( I don't use Windows myself) I will try to fix it. Uwe ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ qwt-interest mailing list qwt-interest <at> lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/qwt-interest

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
qwt-interest mailing list
qwt-interest <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/qwt-interest

Gmane