Results 1 to 4 of 4

Thread: Problem with the QwtPlot

  1. #1
    Join Date
    Jul 2013
    Posts
    9
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows

    Default Problem with the QwtPlot

    Hi,
    When I use the QwtPlot,I have a problem with it.If I set the size(width or height) of the plot larger than 32767,and I set the scale div of axis equal with the size(width or height) of plot.There will appear a black area in the bottom of the plot.Why?? Here is some code and picture in forrow.

    Qt Code:
    1. QwtPlot *plot = new QwtPlot();
    2. plot->enableAxis(QwtPlot::xBottom,false);
    3. div=linearEngine->divideScale(0,33000,50,0,10);
    4. plot->setAxisScaleDiv(QwtPlot::yLeft,div);
    5. plot->setFixedSize(200,33000);
    6. plot->replot()
    7. ;
    To copy to clipboard, switch view to plain text mode 

    plot.jpg
    Thanks for you help!

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

    Default Re: Problem with the QwtPlot

    Probably a general limitation somewhere related to a coordinate system in shorts ?
    But a size of 33000 for a widget doesn't make sense at all and should ( and could ) be avoided anyway.

    Uwe

  3. #3
    Join Date
    Jul 2013
    Posts
    9
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Problem with the QwtPlot

    Thanks for your answer very much.
    When I set a size of 33000 for a QWidget,it displays right,there will not appear a black area in the bottom,only in the QwtPlot it appeared.The plot can display with the right width or height,just a black area appear in the bottom.I don't know why.Is it a problem that QT can not support or the qwt can not support?

    When I set a size of 32000 for the QwtPlot,and the scale div of the axis is 34000,there will not appear a black area.The plot display right.
    Following is the code.
    Qt Code:
    1. QwtPlot *plot = new QwtPlot();
    2. plot->enableAxis(QwtPlot::xBottom,false);
    3. div=linearEngine->divideScale(0,34000,50,0,10);
    4. plot->setAxisScaleDiv(QwtPlot::yLeft,div);
    5. plot->setFixedSize(200,32000);
    6. plot->replot();
    To copy to clipboard, switch view to plain text mode 
    Screenshot from 2014-02-28 15:34:37.jpg
    Last edited by cp; 28th February 2014 at 07:40.

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

    Default Re: Problem with the QwtPlot

    Maybe an issue of the canvas cache ( try to disable it ).

    But to be honest: even if you can solve this issue you will run into others later on. Having a widget with a width of more than 30000 is just the wrong way, IMO it is not worth to spend any more second on trying to fix something.

    Uwe

Similar Threads

  1. axisAutoScale problem in QwtPlot
    By abraxas in forum Qwt
    Replies: 5
    Last Post: 18th August 2012, 20:02
  2. QwtPlot + UI problem
    By petromp in forum Qwt
    Replies: 3
    Last Post: 5th April 2012, 21:35
  3. QWTPLOT problem
    By umulingu in forum Qwt
    Replies: 5
    Last Post: 25th August 2009, 16:34
  4. Problem regarding QWTPLOT
    By sudheer168 in forum Qwt
    Replies: 1
    Last Post: 6th January 2009, 14:18
  5. Problem with QwtPlot
    By sudheer168 in forum Qwt
    Replies: 1
    Last Post: 11th September 2008, 09:04

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.