Results 1 to 6 of 6

Thread: X axis tick label - font size

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Feb 2012
    Posts
    9
    Thanks
    3

    Default X axis tick label - font size

    Hi All,

    I would like to change the font size of the x axis tick label in the exmaple of "friedberg".

    Any suggestion or advice would be really 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: X axis tick label - font size

    Use void QwtPlot::setAxisFont ( int axisId,const QFont & f ) to set axis font.
    For different labels use your own QwtScaleDraw.
    1. Inherit from QwtScaleDraw and overload the virtual function QwtText QwtScaleDraw::label(double v) const
    2. Return the label with the type of font, size etc. from the function.
    3. Use QwtPlot::setAxisScaleDraw to set the scale for the axis in Qwtplot inherited class constructor.

  3. The following user says thank you to pkj for this useful post:

    junhonguk (26th April 2012)

Similar Threads

  1. Y Axis tick labels cut off on left
    By rbergeron in forum Qwt
    Replies: 2
    Last Post: 4th November 2011, 14:29
  2. Replies: 2
    Last Post: 29th September 2011, 13:10
  3. How to resize label font to fit size
    By P@u1 in forum Qt Programming
    Replies: 2
    Last Post: 18th July 2011, 23:07
  4. y-axis tick labels trimmed
    By gib in forum Qwt
    Replies: 2
    Last Post: 2nd April 2010, 05:19
  5. changing QLabel font size(label created on the graphicsView)
    By maverick_pol in forum Qt Programming
    Replies: 11
    Last Post: 17th August 2007, 08:36

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.