Results 1 to 4 of 4

Thread: QwtPlotSpectrogram and contour lines

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Default Re: QwtPlotSpectrogram and contour lines

    I did some further research. If I attach the QwtPlotSpectrogram I use to create the image to a regular QwtPlot, it turns out fine (see attached Image).
    contourplot2.png
    Seems to me, that the different origins of a QwtPlot and a QPixmap (or image in general) are not taken into consideration in the method QwtPlotSpectrogram::draw().

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

    Default Re: QwtPlotSpectrogram and contour lines

    Better try to understand, what the maps are about !

    Qt Code:
    1. QPixmap plotImage = QPixmap(plotSize);
    2. plotImage.fill(QColor(Qt::white));
    3. QPainter painter(&plotImage);
    4.  
    5. xMap.setPaintInterval(0, plotSize.width());
    6. xMap.setScaleInterval(...);
    7.  
    8. yMap.setPaintInterval(plotSize.height(), 0); // inverted !!!
    9. yMap.setScaleInterval(...);
    10.  
    11. plotSpectogram.draw(&painter, xMap, yMap, QRect(QPoint(0, 0), plotSize));
    To copy to clipboard, switch view to plain text mode 

    Uwe

  3. #3

    Default Re: QwtPlotSpectrogram and contour lines

    Thanks, that solved the problem.

Similar Threads

  1. Help understanding QWT Contour Plot
    By jwieland in forum Qwt
    Replies: 11
    Last Post: 7th December 2009, 07:47
  2. Replies: 9
    Last Post: 3rd December 2009, 19:19
  3. Replies: 0
    Last Post: 15th September 2009, 03:34
  4. Replies: 5
    Last Post: 8th September 2009, 14:50
  5. Irregular data and QwtPlotSpectrogram
    By seveninches in forum Qwt
    Replies: 1
    Last Post: 27th January 2008, 11:52

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
  •  
Qt is a trademark of The Qt Company.