Results 1 to 2 of 2

Thread: QwtPlotItem inverting qwtPlot scale

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Apr 2008
    Posts
    53
    Thanks
    10

    Default QwtPlotItem inverting qwtPlot scale

    Hi,

    I have a weird problem where the y-axis will become inverted whenever I do a zoomBase from QwtPlotZoomer. The problem comes from the yMap's d_s1 and d_s2 values being inverted in my virtual void draw() function in my derived QwtPlotItem:

    Qt Code:
    1. class CanvasPicture: public QwtPlotItem
    2. {
    3. public:
    4. virtual void draw(QPainter *painter,
    5. const QwtScaleMap &xMap, const QwtScaleMap &yMap,
    6. const QRect &rect) const
    7. {
    8. }
    To copy to clipboard, switch view to plain text mode 

    I put a break point in this draw function, and each time I zoomBase on the qwtPlot, I see the d_s1 and d_s2 values for yMap inverting each time (-10,10) to (10,-10) to (-10,10) etc.

    My question is what would cause the yMap's scale intervals to be inverted each time draw() is being called? None of my setAxisScale() functions are being called whenever i do a zoomBase, so that's not the one that's inverting the scales.

    Thank you
    Last edited by jmsbc; 11th August 2009 at 21:31.

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.