Results 1 to 4 of 4

Thread: Best way to produce an attached stacked bar plot

  1. #1
    Join Date
    Sep 2007
    Posts
    61
    Thanks
    5
    Thanked 4 Times in 4 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Best way to produce an attached stacked bar plot

    Hello all,

    I'd like to create a plot attached to the top of an existing QwtPlot that shows in our world, a mode of an instrument. It could have up to five or so modes which should all be displayed on a legend. I've attached an example plot, although it only shows a single mode. I have this data as a time series scalar, and we normally plot it as a line, but people have been requesting it as a color bar along the top.

    What is the best way of doing this? I was thinking maybe a stacked horizontal bar? I want it narrow like in the example, but above the my Qwt plot which looks like the spectrogram. Or does it have to be it's own QwtPlot?

    Thanks for any ideas! Or if you have example code, even better!

    Joey

    Screen Shot 2013-04-17 at 3.10.49 PM.jpg

  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: Best way to produce an attached stacked bar plot

    I have absolutely no idea what you want to do - and how is this related to the screenshot ?

    Uwe

  3. #3
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: Best way to produce an attached stacked bar plot

    There seem to be two parts to the request:
    • The secondary plot running across the top of the screenshot composed of coloured blocks, presumably lining up with the blocks in the main plot, showing the instrument mode in force for the samples below.
    • A legend identifying each of the modes with a colour.

  4. #4
    Join Date
    Sep 2007
    Posts
    61
    Thanks
    5
    Thanked 4 Times in 4 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Best way to produce an attached stacked bar plot

    Yes, thanks ChrisW67. You are right. I guess my request wasn't so clear in retrospect. The secondary plot along the top of screenshot is what I am looking to do.

Similar Threads

  1. Replies: 4
    Last Post: 7th December 2011, 09:20
  2. How to produce a single Executable exe file??
    By Gokulnathvc in forum Newbie
    Replies: 1
    Last Post: 4th August 2011, 07:32
  3. getting attached curve to a plot
    By corrado1972 in forum Qwt
    Replies: 2
    Last Post: 22nd June 2011, 09:35
  4. conversion from bytearray to int produce zero
    By daemonna in forum Qt Programming
    Replies: 3
    Last Post: 11th August 2010, 23:52
  5. How to dynamiclly produce the tab by QT/E?
    By xxthink in forum Qt Programming
    Replies: 1
    Last Post: 27th September 2008, 22:08

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.