12-02-2010 06:36 AM
I use LabView 2009 9.0f3 (32 bit).. I want to create a stacked graph with two cursors that extends all plots. I can only find the stacked option for chart but not for graph, and I don't know how to create cursors that overlaps all plots. Attaching an image that my college created showing what I want to achieve.
Thanks,
Solved! Go to Solution.
12-02-2010 10:28 AM - edited 12-02-2010 10:30 AM
You can create an array of plots (don't forget to bundle, place them in a cluster first!).
Since properties are identical for array elements, the cursor positions will be the same for all graphs, no matter which one you move.
12-03-2010 03:56 AM
That's great, thank you!
12-03-2010 04:31 AM - edited 12-03-2010 04:37 AM
Hmm, to handle events from graphs in an array doesn't seem to work. Any ideas? I try to listen to to cursor move and range change events inside value change for the array.
Regards,
12-03-2010 09:51 AM - edited 12-03-2010 09:52 AM
@mrsound wrote:
Hmm, to handle events from graphs in an array doesn't seem to work. Any ideas? I try to listen to to cursor move and range change events inside value change for the array.
Works just fine with dynamic events. Here's a quick rewrite. 😄
12-03-2010 09:58 AM - edited 12-03-2010 10:00 AM
Actually, you should place the graph terminal inside the loop, else the "other" cursors don't properly update.
12-06-2010 03:53 AM
Thanks, this is cool stuff!
I use an event driven state machine and I have placed the event structure in my "Idle" state and I have the graph terminal in my "Update graph" state. Is there any other way to update the other cursors than moving my graph terminal? Maybe the best option is to do my graph calculations in my "update graph" case, but pass the results to a shift register and do the actual graph update in my idle case right before I listen for new events?
What do you think?
12-06-2010 06:57 AM - edited 12-06-2010 07:01 AM
Another problem that I have is that I want one graph to show markers and the other graphs to show my signals. I would like to show the markers in a different way and with a different scale than the other signals, but I would like to have the same cursors for all graphs. Do you have any good ideas? Right now I'm thinking about showing markers in each graph as a separate channel in red "point style", but this will probably eat my memory.
Thank you very much for your help so far!
Hmm, I got an idea! Maybe I could use fixed cursors as my markers?
12-06-2010 10:58 AM
As I said, all graphs will have the same properties and that includes the plot colors.
What you need to do is define multiple plots (e.g. two: a line and a point plot)) and send two plots to each graph as a 2D array. For whatever you don't want to show, make that particular row all NaN. Mix & match! 🙂
12-07-2010 02:50 AM - edited 12-07-2010 02:57 AM
Yes, I understood that all graphs in an array have the same properties, but I was thinking that you maybe had other suggestions too. I have already used NaN's for things that I don't want to show up in the graph and it works perfectly. I liked my idea of using fixed cursors as markers and I think that this is the way I want to go.
Ps. I gave you a couple of Kudos.
Thank you for all your help!