Ormond, Randy | 21 Jul 21:18

Use of QwtScaleDiv

Hello,

 

I’m just getting started with Qwt (ok, restarted, I used it a few years ago.)

 

I’m adapting the supplied histogram example but am confused about how to control the minor axes.  My values are integral so I don’t want tick marks between 0 and 1, 1 and 2 etc.  Can someone advise me a good way to do this?  I tried using QwtScaleDiv but so far no luck.  I don’t think I understand the constructor interfaces, particularly:

QwtScaleDiv( const QwtDoubleInterval&, QwtValueList[NtickTypes])

 

Any advice would be greatly appreciated.

 

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
Uwe Rathmann | 21 Jul 22:04

Re: Use of QwtScaleDiv

On Monday 21 July 2008 21:21, Ormond, Randy wrote:

> QwtScaleDiv( const QwtDoubleInterval&, QwtValueList[NtickTypes])

The interval of the scale ( from -> to ) + the values, where the ticks are. 
Labels are set for all major tick values.

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=/
Rainer Thaden | 21 Jul 23:13

Re: Use of QwtScaleDiv

> 
> QwtScaleDiv( const QwtDoubleInterval&, QwtValueList[NtickTypes])
> 
>  
> 
> Any advice would be greatly appreciated.
> 

Try it like this:

QwtValueList vlist[3];
vlist[0] << -78 << -66 << -54 << -42 << -30 << -18 << -6 << 6 << 18 << 30;
vlist[1] << -84 << -60 << -36 << -12 << 12 << 36;
vlist[2] << -72 << -48 << -24 << 0 << 24;
		
QwtScaleDiv scdiv(78, 36, vlist);

It generates labelled ticks at vlist[2], medium ticks at vlist[1] and 
small ticks at vlist[0]

Adapt it to your needs.

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=/
Ormond, Randy | 21 Jul 23:17

RE: Use of QwtScaleDiv

Rainer,

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 Rainer
Thaden
Sent: Monday, July 21, 2008 4:14 PM
To: List for both Qwt users and developers
Subject: Re: Use of QwtScaleDiv

> 
> QwtScaleDiv( const QwtDoubleInterval&, QwtValueList[NtickTypes])
> 
>  
> 
> Any advice would be greatly appreciated.
> 

Try it like this:

QwtValueList vlist[3];
vlist[0] << -78 << -66 << -54 << -42 << -30 << -18 << -6 << 6 << 18 <<
30;
vlist[1] << -84 << -60 << -36 << -12 << 12 << 36;
vlist[2] << -72 << -48 << -24 << 0 << 24;
		
QwtScaleDiv scdiv(78, 36, vlist);

It generates labelled ticks at vlist[2], medium ticks at vlist[1] and 
small ticks at vlist[0]

Adapt it to your needs.

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=/
David Stranz | 22 Jul 03:15

RE: Use of QwtScaleDiv

Hi Rainer,

Thanks for this.  What should be done if you are only interested
in major ticks?  Is it OK to leave vlist[0] and vlist[1] as
empty lists?  The documentation for this constructor and for
QwtScaleDiv::setInterval() and QwtScaleDiv::setTicks() does not
describe what happens if values for one or more tick types are
not set.  Are defaults drawn for these or nothing?

Best 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
_______________________________________________________________

> -----Original Message-----
> From: qwt-interest-bounces <at> lists.sourceforge.net 
> [mailto:qwt-interest-bounces <at> lists.sourceforge.net] On Behalf 
> Of Rainer Thaden
> Sent: Monday, July 21, 2008 2:14 PM
> To: List for both Qwt users and developers
> Subject: Re: Use of QwtScaleDiv
> 
> > 
> > QwtScaleDiv( const QwtDoubleInterval&, QwtValueList[NtickTypes])
> > 
> >  
> > 
> > Any advice would be greatly appreciated.
> > 
> 
> Try it like this:
> 
> QwtValueList vlist[3];
> vlist[0] << -78 << -66 << -54 << -42 << -30 << -18 << -6 << 6 
> << 18 << 30;
> vlist[1] << -84 << -60 << -36 << -12 << 12 << 36;
> vlist[2] << -72 << -48 << -24 << 0 << 24;
> 		
> QwtScaleDiv scdiv(78, 36, vlist);
> 
> It generates labelled ticks at vlist[2], medium ticks at vlist[1] and 
> small ticks at vlist[0]
> 
> Adapt it to your needs.
> 
> 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=/
Uwe Rathmann | 22 Jul 07:09

Re: Use of QwtScaleDiv

On Tuesday 22 July 2008 03:15, David Stranz wrote:

> Are defaults drawn for these or nothing?

Nothing.

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=/

Gmane