Ormond, Randy | 1 Aug 17:08

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 17:16
Picon

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=/
Ormond, Randy | 1 Aug 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=/
David Stranz | 1 Aug 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 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

Gmane