Results 1 to 3 of 3

Thread: How to change the div text of axis?

  1. #1
    Join Date
    Aug 2008
    Posts
    33
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default How to change the div text of axis?

    I want to change the div text of the "Histogram" example in the QWT example directory. But I found neither of the QWtPlot or QwtScaleDiv has no functions to change these text.

    I want to create a histogram to show the average temperature of each month in a year, so I should change the div text as month name.

    Untitled.jpg

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

    Default Re: How to change the div text of axis?

    You need to overload QwtScaleDraw::label(). Have a look at the cpuplot example - or have a look at the freidberg example from SVN trunk, that has a scale showing names of months.

    Uwe

  3. #3
    Join Date
    Aug 2008
    Posts
    33
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: How to change the div text of axis?

    Thank you! I will try!

Similar Threads

  1. QwtPlot Change Axis Title Alignment
    By deepy in forum Qwt
    Replies: 5
    Last Post: 20th October 2010, 13:40
  2. Replies: 8
    Last Post: 25th April 2010, 21:19
  3. Replies: 1
    Last Post: 5th January 2010, 21:00
  4. Axis direction change
    By ysnegirev in forum Qwt
    Replies: 1
    Last Post: 7th December 2009, 09:05
  5. Replies: 2
    Last Post: 30th June 2009, 17:08

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.