Results 1 to 2 of 2

Thread: Force grid to have fixed number of lines and the same with number of tick labels

  1. #1
    Join Date
    Sep 2011
    Posts
    86
    Thanks
    4
    Thanked 4 Times in 4 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Windows

    Default Force grid to have fixed number of lines and the same with number of tick labels

    I have dynamically changing chart whose both x and y scales are dynamic. I attached grid item to the plot but i don't like the way it is changing along with axis scaling. For instance When I have X axis' interval from 0 to 1500 points i see only 3 vertical lines on grid and the same with tick labels.
    I would like to have always dense amount of grid lines, most preferably fixed on 10 lines, also number of tick labels could be fixed. Tried to enable minor tick but it only give me some amount of additional marks on scale.

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

    Default Re: Force grid to have fixed number of lines and the same with number of tick labels

    Quote Originally Posted by code_err View Post
    I would like to have always dense amount of grid lines, most preferably fixed on 10 lines, also number of tick labels could be fixed. Tried to enable minor tick but it only give me some amount of additional marks on scale.
    Then you did something wrong - when you enable grid lines for the minor ticks ( QwtPlotGrid::enableXMin()/!enableYMin() ) you will see grid lines for every minor tick.

    But modifying attributes of the grid has no effect on number and positions of the ticks. This can be done modifying QwtPlot::setAxisMaxMinor and QwtPlot::setAxisMaxMajor - and of course by setting attributes for the corresponding scale engine.

    Uwe

Similar Threads

  1. How to hide tick labels
    By ken123 in forum Qwt
    Replies: 1
    Last Post: 24th November 2011, 07:15
  2. Replies: 0
    Last Post: 1st July 2010, 18:22
  3. Replies: 2
    Last Post: 5th February 2009, 11:21
  4. how can I find number of lines in QTextedit ?
    By newplayer in forum Newbie
    Replies: 10
    Last Post: 14th August 2008, 23:02
  5. Tick Labels for Slider
    By jcraig in forum Qt Tools
    Replies: 2
    Last Post: 9th August 2007, 17:21

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.