PDA

View Full Version : Best way to produce an attached stacked bar plot



bigjoeystud
17th April 2013, 21:20
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

8959

Uwe
18th April 2013, 07:29
I have absolutely no idea what you want to do - and how is this related to the screenshot ?

Uwe

ChrisW67
18th April 2013, 07:56
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.

bigjoeystud
18th April 2013, 22:47
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.