Results 1 to 2 of 2

Thread: plot dates on x-axis, convert from unix?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Oct 2010
    Posts
    58
    Thanks
    26
    Qt products
    Qt4
    Platforms
    Windows

    Default plot dates on x-axis, convert from unix?

    Hi,

    I have two double data arrays that I am plotting using SetRawSamples. My y-axis is some values and the x-axis is the date in unix time. I was wondering if there was a way to get the x-axis to show the date in human readable terms. Should I be using something other than SetRawSamples to plot?

    I was thinking I could iterate through my date arrays and convert them to human readable times, but after I did that how would I get qwt to plot those dates? I know I wouldn't be able to use setRawSamples any more.

    I've been looking through the forums and it seems like qwtScaleDraw might be what I need but I really don't know where to start.
    Any ideas?

    Thanks!

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

    Default Re: plot dates on x-axis, convert from unix?

    Check the cpuplot example.

    Uwe

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

    kja (20th November 2010)

Similar Threads

  1. Replies: 1
    Last Post: 30th July 2010, 07:23
  2. x-axis for waterfall plot
    By janK in forum Qwt
    Replies: 8
    Last Post: 29th July 2009, 15:00
  3. qwp plot axis scale
    By Cal in forum Qwt
    Replies: 1
    Last Post: 11th May 2009, 17:10
  4. Detecting changes in the qwt plot axis
    By mrcolin in forum Qwt
    Replies: 2
    Last Post: 27th January 2009, 12:53
  5. How to convert unix time to QDateTime
    By lni in forum Qt Programming
    Replies: 3
    Last Post: 14th November 2007, 00:25

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
  •  
Qt is a trademark of The Qt Company.