Results 1 to 2 of 2

Thread: Qwt with labeled x-axis

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

    Default Qwt with labeled x-axis

    Hi

    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
    Location
    Bangalore
    Posts
    207
    Thanks
    20
    Thanked 28 Times in 27 Posts
    Qt products
    Qt4
    Platforms
    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, 22:21
  2. How to customize the X axis?
    By lvdong in forum Qwt
    Replies: 2
    Last Post: 10th August 2010, 03:53
  3. Replies: 0
    Last Post: 9th August 2010, 11:46
  4. Labels on axis.
    By eugene in forum Qwt
    Replies: 5
    Last Post: 6th August 2010, 14:30
  5. axis question
    By mesman00 in forum Qwt
    Replies: 1
    Last Post: 12th November 2008, 15:54

Tags for this Thread

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.