Results 1 to 4 of 4

Thread: sticks and baseline

  1. #1
    Join Date
    May 2012
    Posts
    3
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default sticks and baseline

    Hi.

    I'm trying to plot a curve using sticks and setting the baseline.

    If I add 3 data points (1,5), (2,-5), (3,15) with baseline 0.0 I get 3 sticks drawn but they are between 0->5, 5->-5 and -5->15.

    If I change the baseline to 3.0 I get the 3 sticks 3->5, 5->-5 and -5->15. So the baseline only changes the first stick.

    Am I misunderstanding how it should work? I was expecting the 3 sticks to show (0->5), (0->-5) and (0,15). (Which is the behaviour I see in the example.)

    Thanks.

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

    Default Re: sticks and baseline

    Quote Originally Posted by JimmyS View Post
    If I change the baseline to 3.0 I get the 3 sticks 3->5, 5->-5 and -5->15. So the baseline only changes the first stick.
    The result has to be: 3->5, 3->-5, 3->15.

    Uwe

  3. #3
    Join Date
    May 2012
    Posts
    3
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: sticks and baseline

    Hi Uwe,

    that's what I was expecting, but not what I'm seeing.

    I'll see if I can find anything odd in my code compared to the example. Not sure if I have the qwt source on my kubuntu machine, but I'll grab it if I have to.

    Regards,

    Jimmy

  4. #4
    Join Date
    May 2012
    Posts
    3
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: sticks and baseline

    Hi, Uwe.

    I found my problem - I managed to duplicate x co-ords in my data, so at each x value I had two sticks being drawn, one with the correct y value and one with the previous y value.

    Works perfectly now.

    Jimmy

Similar Threads

  1. Replies: 10
    Last Post: 7th March 2012, 18:22
  2. Replies: 0
    Last Post: 24th October 2011, 12:52
  3. Replies: 1
    Last Post: 28th January 2010, 12:57
  4. Sticks on plot not working
    By giusepped in forum Qwt
    Replies: 3
    Last Post: 11th February 2009, 09:55
  5. Sticks on plot not working
    By giusepped in forum Qwt
    Replies: 0
    Last Post: 10th February 2009, 07:19

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.