Results 1 to 4 of 4

Thread: Space between scale and labels in qwtPLot

  1. #1
    Join Date
    Dec 2013
    Location
    Jerada, Morroco
    Posts
    106
    Thanks
    11
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Space between scale and labels in qwtPLot

    Hi all,

    I overloaded the method label of QwtScaleDraw in order to show some kind of dates on the xAxis , but the problem is the space between the scalWidget and labels is small i can't see the whole date. I attached here a picture for the problem.

    CapturePlot.jpg

    How i can resolve this?

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

    Default Re: Space between scale and labels in qwtPLot

    Check the cpuplot example.

    Uwe

  3. #3
    Join Date
    Dec 2013
    Location
    Jerada, Morroco
    Posts
    106
    Thanks
    11
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Space between scale and labels in qwtPLot

    Thanx for your reply, i added this
    setAxisLabelAlignment( QwtPlot::xBottom, Qt::AlignLeft | Qt::AlignBottom );
    to my code and it works fine.

    But i want also display labels vertically and i have the same problem , how ican change the parametrs of setAxisLabelAlignment to resolve it.

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

    Default Re: Space between scale and labels in qwtPLot

    It is always a combination of alignment and rotation. The origin of the text rotation is at the end of the tick ( + some pixels margin ), so it depends on the angle of the rotation, if you have to align the text to the left or the right.

    Put your newspaper on the table, fix a word with your finger and rotate the paper. It is the same as above - depending on the angle you have to put your finger left or right from the word.

    Uwe

  5. The following user says thank you to Uwe for this useful post:

    hassinoss (21st May 2014)

Similar Threads

  1. Replies: 1
    Last Post: 14th April 2014, 06:27
  2. QwtPlot space between axes ?
    By hassinoss in forum Qwt
    Replies: 2
    Last Post: 14th February 2014, 18:29
  3. QwtPlot axis labels
    By Kutuska in forum Qwt
    Replies: 7
    Last Post: 29th August 2012, 16:08
  4. Labels on QwtPlot
    By penny in forum Qwt
    Replies: 7
    Last Post: 14th January 2011, 16:24
  5. Access and change labels on the X-scale
    By Tottish in forum Qwt
    Replies: 0
    Last Post: 26th October 2010, 16:42

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.