Results 1 to 6 of 6

Thread: How to force plot grid to follow top axis?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Mar 2011
    Posts
    25
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Thanks
    2

    Default Re: How to force plot grid to follow top axis?

    Thank you a lot Uwe!

    That was really stupid question, I should have look at QwtPlotItem interface of course

    Could you please tell is it also possible to get an axis with a non-regular scale?
    I.e. when the ticks are defined in a complete arbitrary way, say, by a table or so on.
    Playing around with QwtTransform did not bring a lot, actually.
    Or there is another approach to achieve this?

    btw, Qwt is great

  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: How to force plot grid to follow top axis?

    Quote Originally Posted by Sintegrial View Post
    Could you please tell is it also possible to get an axis with a non-regular scale?
    When there is no rule use QwtPlot::setAxisScaleDiv(), otherwise the rule has to be implemented somehow using QwtScaleEngine/QwtTransform.

    Uwe

  3. #3
    Join Date
    Mar 2011
    Posts
    25
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Thanks
    2

    Default Re: How to force plot grid to follow top axis?

    I've tried to use setAxisScaleDiv() as a very simple test, like that:

    QwtScaleDiv scaleDiv(0.0, samplesCount);

    m_plotPtr->setAxisScaleDiv(QwtPlot::xBottom, scaleDiv);
    m_plotPtr->enableAxis(QwtPlot::xBottom, true);
    but unfortunately the bottom axis disappears after these lines

  4. #4
    Join Date
    Mar 2011
    Posts
    25
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Thanks
    2

    Default Re: How to force plot grid to follow top axis?

    Ok, found the reason: when there are no ticks set, the scala will not be drawn.
    Thank you again Uwe!

Similar Threads

  1. Replies: 7
    Last Post: 10th July 2013, 13:32
  2. Force format for Axis numbering
    By FreddyKay in forum Qwt
    Replies: 1
    Last Post: 28th June 2013, 06:42
  3. Replies: 1
    Last Post: 5th March 2012, 06:34
  4. Replies: 9
    Last Post: 3rd May 2011, 21:21
  5. Qwt plot + grid huge pdf file
    By giusepped in forum Qwt
    Replies: 3
    Last Post: 17th December 2008, 13:53

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.