Results 1 to 3 of 3

Thread: Problem with QwtPlotGrid

  1. #1
    Join Date
    Dec 2013
    Posts
    7
    Thanks
    2
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows

    Default Problem with QwtPlotGrid

    Hi,

    I'm using a QwtPlotGrid on my chart and so far it worked just as expected. But now I would like to draw the y-axis on the right hand side and suddenly the alignment of the grid doesn't fit anymore.
    I added two screenshots. The first shows the expected result where the grid is aligned to the labels of the y-axis. The second shows the unexpected result.
    stockchart2.jpgstockchart1.jpg

    What I'm doing to switch the y-axis to the rhs is the following:

    Qt Code:
    1. enableAxis(QwtPlot::yRight, true);
    2. enableAxis(QwtPlot::yLeft, false);
    To copy to clipboard, switch view to plain text mode 
    and a bit later when I have created the curve:
    Qt Code:
    1. curve->setYAxis(QwtPlot::yRight);
    To copy to clipboard, switch view to plain text mode 
    That's all and I'm wondering if I'm doing something fundamentally wrong..? I had a look at
    Qt Code:
    1. QwtPlotGrid::setYDiv()
    To copy to clipboard, switch view to plain text mode 
    but that didn't get me any further.

    Any help would be appreciated.

  2. #2
    Join Date
    Dec 2013
    Location
    Toronto, Canada
    Posts
    62
    Thanked 16 Times in 15 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: Problem with QwtPlotGrid

    and suddenly the alignment of the grid doesn't fit anymore
    do...

    QwtPlotGrid* grid
    ...
    ...
    grid->setYAxis(QwtPlot::yRight);

  3. The following user says thank you to Cah for this useful post:

    wooosh (5th February 2014)

  4. #3
    Join Date
    Dec 2013
    Posts
    7
    Thanks
    2
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Problem with QwtPlotGrid

    Thank you!

Similar Threads

  1. qwtplotgrid and qwtscalediv problem
    By tangtao_xp in forum Qwt
    Replies: 9
    Last Post: 15th June 2013, 07:02
  2. Replies: 3
    Last Post: 11th March 2013, 07:31
  3. Replies: 6
    Last Post: 28th March 2012, 00:11
  4. painting in QwtPlotGrid
    By ready in forum Qwt
    Replies: 2
    Last Post: 18th July 2011, 06:26

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.