Uwe Rathmann | 1 Apr 2012 11:29
Picon

Re: Nonumiform raster data resampler for QwtPlotSpectrogram (Qwt 5.2)

Hi David,
> After converting all of my stack-based objects to heap-based, and
> changing a few other things, it seems to be working now on both Qwt 5.2
> and Qwt 6.0.1.
>
> I will post revised code on QtCentre shortly in the same thread as
> referenced before.

I tried to compile your code on my linuy box ( for the Qwt 6.0 branch in 
SVN ) with the following project file:

--
CONFIG += qwt

HEADERS += \
     Gaussian.h \
     GaussianResampler.h \
     NonuniformRasterData.h \
     GaussianSplatTest.h

SOURCES += \
     GaussianResampler.cpp \
     main.cpp \
     NonuniformRasterData.cpp \
     GaussianSplatTest.cpp

FORMS += GaussianSplatTest.ui
--

Then I configured qmake to use Qwt from where I installed it on my box: 
(Continue reading)

David Stranz | 1 Apr 2012 16:13

Re: Nonumiform raster data resampler for QwtPlotSpectrogram (Qwt 5.2)

Hi Uwe,

Thanks for checking it out.

I notice some small "edge effects" in some of the plots.  I think that 
is due to the threshold on the Gaussian spread of the dots - even though 
I say they are circular, it is actually a square, so the corners go a 
little bit less than the threshold, while the edges cut off at the 
threshold.  (Or may it is the other way around - I will look at this).

 > Next I fixed a couple of compiler errors, because some of the
 > QWT_VERSION>= 0x060000 checks need to be v.v.

I don't know what "v.v" means.  "Vice versa"?   So I had the version 
check reversed?  If you could e-mail back the changes to the source 
code, I can update mine.

If you would like to incorporate it into Qwt, please feel free to do 
that.  I see there are some things in the NonuniformRasterData class 
that I think are already in QwtRasterData (intervals, f.e.).

 > PS: When adding "pSpectrogram->setRenderThreadCount( 0 );" the
 > spectrogram should render the image in a number of threads, that
 > should be optimal for the system, where your demo is executed.

I will try that today.

Best regards,

David
(Continue reading)

Uwe Rathmann | 1 Apr 2012 16:38
Picon

Re: Nonumiform raster data resampler for QwtPlotSpectrogram (Qwt 5.2)

Hi David,

>   >  Next I fixed a couple of compiler errors, because some of the
>   >  QWT_VERSION>= 0x060000 checks need to be v.v.
>
> I don't know what "v.v" means.  "Vice versa"?   So I had the version
> check reversed?  If you could e-mail back the changes to the source
> code, I can update mine.

F.e.:

#if ( QWT_VERSION >= 0x060000 )
     QwtPointArrayData   *       mpArrayData;
#endif

has to be

#if ( QWT_VERSION < 0x060000 )
     QwtPointArrayData   *       mpArrayData;
#endif

> If you would like to incorporate it into Qwt, please feel free to do
> that.  I see there are some things in the NonuniformRasterData class
> that I think are already in QwtRasterData (intervals, f.e.).

The substance of your algorithm is how to convert your data into a 2D 
matrix ( see my comments in the forum - but please continue here ).
 From the point of view of the class design I would love to have your 
GaussianResampler as a class that builds a regular matrix from any point 
cloud ( maybe even completely unsorted ? )
(Continue reading)

David Stranz | 1 Apr 2012 17:15

Re: Nonumiform raster data resampler for QwtPlotSpectrogram (Qwt 5.2)

Hi Uwe,

 > F.e.:
 >
 > #if ( QWT_VERSION>= 0x060000 )
 >       QwtPointArrayData   *       mpArrayData;
 > #endif
 >
 > has to be
 >
 > #if ( QWT_VERSION<  0x060000 )
 >       QwtPointArrayData   *       mpArrayData;
 > #endif

Hmm, are you sure?  I had to add this member *because* in 6.x the method

QwtPlotCurve::setData( const double * x, const double * y, int n )

no longer exists, so I had to construct this facade instance in order to 
pass in the arrays.  In 5.2, the method above is just fine.

 > The substance of your algorithm is how to convert your data into a 2D
 > matrix ( see my comments in the forum - but please continue here ).
 >   From the point of view of the class design I would love to have your
 > GaussianResampler as a class that builds a regular matrix from any
 > point cloud ( maybe even completely unsorted ? )
 > that could be used to feed QwtPlotMatrixData. Do you believe this is
 > possible ?

There are no sorting requirements on the point cloud.
(Continue reading)

Uwe Rathmann | 1 Apr 2012 17:40
Picon

Re: Nonumiform raster data resampler for QwtPlotSpectrogram (Qwt 5.2)

Hi David,

> Hmm, are you sure?  I had to add this member *because* in 6.x the method
>
> QwtPlotCurve::setData( const double * x, const double * y, int n )
>
> no longer exists, so I had to construct this facade instance in order to
> pass in the arrays.  In 5.2, the method above is just fine.

Ah sorry - I was wrong: the problems are because of incompatibilities 
between Qwt 6.0 and Qwt 6.1 ( = SVN trunk ). When building your code 
with Qwt from SVN trunk everything is fine.

Uwe

------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure
Eugene Mamin | 2 Apr 2012 14:11
Picon
Gravatar

QwtPolar: inverse (CW) azimuth axis direction.

     Good day, everyone.

I am trying to create QwtPolar widget with inversed azimuth axis. My finish goal looks like this schematic plot:

       0
270  +  90
     180

I am using those lines:

plot->setAzimuthOrigin (M_PI_2);
plot->scaleDiv (QwtPolar::ScaleAzimuth)->setInterval (360, 0);

I can't see azimuth axis label with zero coordinate and tracker shows range [0;90] as [360;470]. So I wrote workaround patch (see attachment).
How could I get this in proper way ?

P.S. I've found small bug with Lines CurveStyle drawing with enabled Fitting, see attachment.

Eugene Mamin.
Attachment (qwt_patch.patch): application/octet-stream, 532 bytes
Attachment (qwt_polar_patch.patch): application/octet-stream, 1013 bytes
------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure
_______________________________________________
qwt-interest mailing list
qwt-interest <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/qwt-interest
Paul | 2 Apr 2012 21:30
Picon

Re: overlapping labels / collisions

oh, thanks for much for your replies!  i had no idea i was getting
responses, guess my new feed setting was off. i guess some manual work
may be involved.

thank you,
paul

On Sun, Mar 18, 2012 at 4:18 PM, Paul <paulanon <at> gmail.com> wrote:
> Hello there,
>
> Fairly new to QWT and wasn't sure about all of its features.
> Specifically, I'm interested in showing a lot of labels.  Enough
> labels that they can collide with each other.
>
> Here's an image of what I'd like to implement.
> http://imgur.com/wyI8T
>
> Basically, the labels move away from each other and possibly show
> another line pointing to the top of the peak.
>
> I'm trying to see if there's anything already implemented in QWT that
> can take care of or help with this issue.  If neither, know of any
> existing libraries to handle collisions?
>
> Thanks in advance,
> Paul

------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure
Paul | 2 Apr 2012 22:00
Picon

aligning multiple charts and y-labels using scientific notations

Hi there,

I have four plots stacked vertically with the same x-range (with
different y-range).  I'm trying to make sure that the user sees them
perfectly aligned in the screen space.  That is, if the four plots
show the same point in x-position, they can place a physical ruler
vertically on the screen and see them aligned.  However, this does not
happen because the y-axis is not aligned, as seen on this image:

http://imgur.com/1lFQe

I'm wondering how to fix this.  The culprit seems to be the y-label
string length.
Solution 1) I actually want to use use scientific notation for the
y-range, which in turn will implicitly align the y-axis of the four
plots as they would have the same string length.  Solution 2) Maybe
there's a more direct way to control the position of the y-axis in
screen space?

Thanks in advance,
Paul

PS. btw, good guess David :)

------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure
David Stranz | 2 Apr 2012 22:17

Re: aligning multiple charts and y-labels using scientific notations

Paul,

 > PS. btw, good guess David :)

LOL.  And doing proteomics, too.

In Qwt 5.2, there was a "plotmatrix" example which I don't see (yet) in 
the Qwt 6 release.  However, the guts of the code give the method for 
aligning the y axes of multiple stacked QwtPlots.  The plotmatrix 
example assumes a grid of numRows x numCols plots:

void PlotMatrix::alignVAxes(int col, int axis)
{
     if ( axis != QwtPlot::yLeft && axis != QwtPlot::yRight )
         return;

     int maxExtent = 0;
     for ( int row = 0; row < numRows(); row++ )
     {
         QwtPlot *p = plot(row, col);
         if ( p )
         {
             QwtScaleWidget *scaleWidget = p->axisWidget(axis);

             QwtScaleDraw *sd = scaleWidget->scaleDraw();
             sd->setMinimumExtent(0);

             const int extent = sd->extent(
                 QPen(Qt::black, scaleWidget->penWidth()),
                 scaleWidget->font() );
             if ( extent > maxExtent )
                 maxExtent = extent;
         }
     }
     for ( int row = 0; row < numRows(); row++ )
     {
         QwtPlot *p = plot(row, col);
         if ( p )
         {
             QwtScaleWidget *scaleWidget = p->axisWidget(axis);
             scaleWidget->scaleDraw()->setMinimumExtent(maxExtent);
         }
     }
}

I think you can figure out from this what needs to be done in your case.

Cheers,

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
_______________________________________________________________

On 4/2/2012 1:00 PM, Paul wrote:
> Hi there,
>
> I have four plots stacked vertically with the same x-range (with
> different y-range).  I'm trying to make sure that the user sees them
> perfectly aligned in the screen space.  That is, if the four plots
> show the same point in x-position, they can place a physical ruler
> vertically on the screen and see them aligned.  However, this does not
> happen because the y-axis is not aligned, as seen on this image:
>
> http://imgur.com/1lFQe
>
> I'm wondering how to fix this.  The culprit seems to be the y-label
> string length.
> Solution 1) I actually want to use use scientific notation for the
> y-range, which in turn will implicitly align the y-axis of the four
> plots as they would have the same string length.  Solution 2) Maybe
> there's a more direct way to control the position of the y-axis in
> screen space?
>
> Thanks in advance,
> Paul
>
> PS. btw, good guess David :)
>
> ------------------------------------------------------------------------------
> This SF email is sponsosred by:
> Try Windows Azure free for 90 days Click Here
> http://p.sf.net/sfu/sfd2d-msazure
> _______________________________________________
> qwt-interest mailing list
> qwt-interest <at> lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/qwt-interest
>
>

------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure
Paul | 3 Apr 2012 03:57
Picon

Re: aligning multiple charts and y-labels using scientific notations

Thanks David, I will check that out.

I think I'm also interested in showing scientific notations, just
because.  Is there a flag that I can set, or is it more involved than
that.

Thanks.

On Mon, Apr 2, 2012 at 1:17 PM, David Stranz <David_Stranz <at> massspec.com> wrote:
> Paul,
>
>  > PS. btw, good guess David :)
>
> LOL.  And doing proteomics, too.
>
> In Qwt 5.2, there was a "plotmatrix" example which I don't see (yet) in
> the Qwt 6 release.  However, the guts of the code give the method for
> aligning the y axes of multiple stacked QwtPlots.  The plotmatrix
> example assumes a grid of numRows x numCols plots:
>
> void PlotMatrix::alignVAxes(int col, int axis)
> {
>     if ( axis != QwtPlot::yLeft && axis != QwtPlot::yRight )
>         return;
>
>     int maxExtent = 0;
>     for ( int row = 0; row < numRows(); row++ )
>     {
>         QwtPlot *p = plot(row, col);
>         if ( p )
>         {
>             QwtScaleWidget *scaleWidget = p->axisWidget(axis);
>
>             QwtScaleDraw *sd = scaleWidget->scaleDraw();
>             sd->setMinimumExtent(0);
>
>             const int extent = sd->extent(
>                 QPen(Qt::black, scaleWidget->penWidth()),
>                 scaleWidget->font() );
>             if ( extent > maxExtent )
>                 maxExtent = extent;
>         }
>     }
>     for ( int row = 0; row < numRows(); row++ )
>     {
>         QwtPlot *p = plot(row, col);
>         if ( p )
>         {
>             QwtScaleWidget *scaleWidget = p->axisWidget(axis);
>             scaleWidget->scaleDraw()->setMinimumExtent(maxExtent);
>         }
>     }
> }
>
> I think you can figure out from this what needs to be done in your case.
>
> Cheers,
>
> 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
> _______________________________________________________________
>
>
> On 4/2/2012 1:00 PM, Paul wrote:
>> Hi there,
>>
>> I have four plots stacked vertically with the same x-range (with
>> different y-range).  I'm trying to make sure that the user sees them
>> perfectly aligned in the screen space.  That is, if the four plots
>> show the same point in x-position, they can place a physical ruler
>> vertically on the screen and see them aligned.  However, this does not
>> happen because the y-axis is not aligned, as seen on this image:
>>
>> http://imgur.com/1lFQe
>>
>> I'm wondering how to fix this.  The culprit seems to be the y-label
>> string length.
>> Solution 1) I actually want to use use scientific notation for the
>> y-range, which in turn will implicitly align the y-axis of the four
>> plots as they would have the same string length.  Solution 2) Maybe
>> there's a more direct way to control the position of the y-axis in
>> screen space?
>>
>> Thanks in advance,
>> Paul
>>
>> PS. btw, good guess David :)
>>
>> ------------------------------------------------------------------------------
>> This SF email is sponsosred by:
>> Try Windows Azure free for 90 days Click Here
>> http://p.sf.net/sfu/sfd2d-msazure
>> _______________________________________________
>> qwt-interest mailing list
>> qwt-interest <at> lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/qwt-interest
>>
>>
>
>
> ------------------------------------------------------------------------------
> This SF email is sponsosred by:
> Try Windows Azure free for 90 days Click Here
> http://p.sf.net/sfu/sfd2d-msazure
> _______________________________________________
> qwt-interest mailing list
> qwt-interest <at> lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/qwt-interest

------------------------------------------------------------------------------
Better than sec? Nothing is better than sec when it comes to
monitoring Big Data applications. Try Boundary one-second 
resolution app monitoring today. Free.
http://p.sf.net/sfu/Boundary-dev2dev

Gmane