Results 1 to 2 of 2

Thread: Simple howto for a dates on a QwtPlot axis, and howto stop ticks when plot stops?

  1. #1
    Join Date
    Jul 2010
    Posts
    11
    Qt products
    Qt4
    Platforms
    MacOS X

    Default Simple howto for a dates on a QwtPlot axis, and howto stop ticks when plot stops?

    Firstly, apologies. I know there are a lot of threads on date/time scales.
    But I believe I have read them all, and I still don't know how to do it. I know it has something to do with the setAxisScale methods, but I can't figure it out. Utter newbie.

    If someone could briefly outline how to show dates rather than integers along the x axis of a QwtPlot, I would be very grateful. Just point me in the right direction. If your answer says I have to subclass QwtPlot, I will be grateful, but sad. Subclassing is still in my "too hard" basket, though I hope to get there soon.

    And also (while I am begging for help) how do you stop an axis adding empty ticks to the end, as (I gather) the scale engine does when it is rounding up the number of data points? I want my axis to end with the data, rather than end on a nice round number.

    Thanks

    John
    Learning, one problem at a time.

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

    Default Re: Simple howto for a dates on a QwtPlot axis, and howto stop ticks when plot stops?

    Subclassing is still in my "too hard" basket, though I hope to get there soon.
    Trying to write code in a OO language without knowing the very basic OO concepts is not a good idea. Without subclassing you will fail when you try to implement a Qwt/Qt application.

    I want my axis to end with the data, rather than end on a nice round number.
    QwtScaleEngine::Floating, see http://qwt.sourceforge.net/class_qwt...e005960f35b3b7

    Uwe

Similar Threads

  1. Replies: 12
    Last Post: 18th May 2011, 20:40
  2. Replies: 1
    Last Post: 16th March 2010, 15:23
  3. Howto use Qt with Boost ?
    By bilgenratte in forum Qt Programming
    Replies: 3
    Last Post: 1st October 2009, 14:12
  4. Replies: 4
    Last Post: 14th May 2009, 10:31
  5. HowTo Debug
    By SenSej in forum Newbie
    Replies: 0
    Last Post: 17th October 2008, 12:45

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.