Results 1 to 2 of 2

Thread: Qwt with labeled x-axis

  1. #1
    Join Date
    Sep 2010
    Qt products
    Qt3 Qt4 PyQt3 PyQt4
    Unix/X11 Windows

    Default Qwt with labeled x-axis


    I have a QwtPlot with a x- and y-axis and presenting a histogram.
    I want the y-axis to display values from 0 - 100 (which is default in QwtPlot and not a problem).
    However, I want the x-axis to display labels instead of values. So instead of number on the x-axis, I want a number of labels to be displayed underneath each histogram bar.

    Any help would be appreciated.

  2. #2
    Join Date
    Feb 2011
    Thanked 28 Times in 27 Posts
    Qt products
    Unix/X11 Windows

    Default Re: Qwt with labeled x-axis

    Please follow friedberg and cpuplot example which came along qwt. basically you have to subclass QwtScaleDraw. In the virtual label function, put in a logic which returns the string you want for a given x axis value. HTH.

Similar Threads

  1. Replies: 9
    Last Post: 3rd May 2011, 21:21
  2. How to customize the X axis?
    By lvdong in forum Qwt
    Replies: 2
    Last Post: 10th August 2010, 02:53
  3. Replies: 0
    Last Post: 9th August 2010, 10:46
  4. Labels on axis.
    By eugene in forum Qwt
    Replies: 5
    Last Post: 6th August 2010, 13:30
  5. axis question
    By mesman00 in forum Qwt
    Replies: 1
    Last Post: 12th November 2008, 14:54

Tags for this Thread


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.