+ Reply to Thread
Results 1 to 6 of 6

Thread: QwtPlot very slow for FACS plot (many marker points)

  1. #1
    Join Date
    Mar 2010
    Location
    Auckland, NZ
    Posts
    60
    Thanks
    6
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default QwtPlot very slow for FACS plot (many marker points)

    Hi,
    I am generating a FACS plot, which is simply a large number of points, each a QwtPlotMarker:

    for (i=0; i<Global::nFACS_cells; i++) {
    x = Global::FACS_data[Global::nvars_used*i+kvar_x];
    y = Global::FACS_data[Global::nvars_used*i+kvar_y];
    x = xscale*x;
    y = yscale*y;
    y = max(y,1.01*ymin);
    if (x >= xmin) {
    QwtPlotMarker* m = new QwtPlotMarker();
    m->setSymbol( symbol );
    m->setValue( QPointF( x,y ) );
    m->attach( qpFACS );
    }
    }

    when nFACS_cells = 80k this is taking 35 seconds (Qwt 5.2.1, Windows 7, Core i7).
    Is there something I can do to speed this up? I don't want to go to a later Qwt version unless absolutely necessary.

    Thanks
    Gib

  2. #2
    Join Date
    Feb 2006
    Location
    Munich, Germany
    Posts
    3,068
    Thanked 801 Times in 750 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: QwtPlot very slow for FACS plot (many marker points)

    Quote Originally Posted by gib View Post
    ... a large number of points, each a QwtPlotMarker:
    What is already the answer to your question - using a marker for each point is probably the most uneffician implementation possible.
    Why not simply using a curve ?

    Uwe

  3. #3
    Join Date
    Mar 2010
    Location
    Auckland, NZ
    Posts
    60
    Thanks
    6
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default Re: QwtPlot very slow for FACS plot (many marker points)

    Hi Uwe,

    A FACS (or flow cytometry) plot is made up of a large number of dots:
    https://www.google.com/search?q=facs...w=1920&bih=918
    Can I achieve this result with a curve?

    Gib

  4. #4
    Join Date
    Feb 2006
    Location
    Munich, Germany
    Posts
    3,068
    Thanked 801 Times in 750 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: QwtPlot very slow for FACS plot (many marker points)

    Quote Originally Posted by gib View Post
    Can I achieve this result with a curve?
    Yes of course - check the examples.

    For the situation of having a dot of 1x1 pixels as symbol, there is a special optimization being shown in the scatterplot example.

    Uwe

  5. The following user says thank you to Uwe for this useful post:

    gib (Yesterday)

  6. #5
    Join Date
    Mar 2010
    Location
    Auckland, NZ
    Posts
    60
    Thanks
    6
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default Re: QwtPlot very slow for FACS plot (many marker points)

    Thanks Uwe, I don't know how I missed this. I'll recode and check the timing.

    Gib

  7. #6
    Join Date
    Feb 2006
    Location
    Munich, Germany
    Posts
    3,068
    Thanked 801 Times in 750 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: QwtPlot very slow for FACS plot (many marker points)

    Quote Originally Posted by gib View Post
    I'll recode and check the timing.
    Please post the new numbers - it might be interesting for others to see the difference.

    Uwe

+ Reply to Thread

Similar Threads

  1. Replies: 2
    Last Post: 2nd December 2016, 15:29
  2. Replies: 2
    Last Post: 12th September 2012, 07:43
  3. Zooming the plot without the marker
    By raghvendramisra in forum Qwt
    Replies: 1
    Last Post: 17th May 2012, 17:24
  4. Replies: 4
    Last Post: 14th May 2009, 10:31
  5. Moving plot marker with the mouse
    By viridis in forum Qwt
    Replies: 2
    Last Post: 23rd September 2008, 20:39

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts