LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Can I change the order plots are written to an XY graph without changing their order in the plot array?

In LV6.1 the order in which plots are written to an XY graph is in reverse order from the order they appear in the array of plots that is feed to the XY graph control. Thus at places where �Plot 0� intersects �Plot 1�, the �Plot 0� data appears in front of the �Plot 1� data. I would like to reverse this without switching the order the plot array is built-up. Is this possible? I�ve attached a vi that demonstrates what I�m taking about. In my application I have many �highlights� that I do NOT want to list in the plot legend but that I wish to plot �over� the channel data that IS listed in the legend.

Thanks
0 Kudos
Message 1 of 8
(3,266 Views)


One quick trick is to use a second "transparent" graph and lay it on top of the original one. You can make the graph transparent using the color picker tool and selecting the "T" in the top-right corner of the color palette. You will also have to hide all the visible items for this "transparent" graph.

Hope this helps,

Khalid


Message 2 of 8
(3,266 Views)
You cannot reorder the layering of the plots. More percisely, the ordering of the plots (like on the plot legend) is the ordering of the layering.

Khalid is right on the money for a workaround. I give him 4 stars.
Message 3 of 8
(3,266 Views)
Thanks for this idea. I misunderstood what you meant until Jeremy responded saying you were �right on the money�. I thought you meant that putting another plot in the array but making it transparent was going to help somehow, but now I understand that you mean plotting the �up front� data to a separate XY graph indicator which is transparent and overlaying the original XY graph. I may wind-up doing this. I�m just not excited about linking all the scaling info from one graph to the scaling of the transparent graph and creating the necessary event handling so that when the user scales one graph or changes the auto-scaling, the other graph�s scales gets updated, but perhaps it�s the only way. Thanks again for your input.
0 Kudos
Message 4 of 8
(3,266 Views)
Thanks for your input, Jeremy. Without it I'd still be confused about what Khalid had suggested. Having someone else say he was "right on the money" clued me in that I must have misunderstood.
0 Kudos
Message 5 of 8
(3,266 Views)
Sorry for not being clear earlier.

About keeping the two graphs in sync, one approach would be to use property nodes -- read properties from the one which the user modifies and write them to the other one.

I agree it still will not be a very "clean solution."

Regards,

Khalid


0 Kudos
Message 6 of 8
(3,266 Views)
OK. I broke down and implemented this work around. I just want to note another sticky problem with this solution in case someone else is following this thread. Since the transparent graph is in front of the original graph, the zoom tool, grab tool, and cursor tool of the original graph cannot be used as long as the transparent graph is visible. The only way I can think of to get around this is to give the user an option to turn-off (make invisible) the transparent graph.
0 Kudos
Message 7 of 8
(3,266 Views)
Was just wondering.. in that case you may want to keep your original graph on top and make it the transparent one. All user actions would then be associated with this one now.

Again, this still is not a clean solution 🙂

Khalid

0 Kudos
Message 8 of 8
(3,266 Views)