07-21-2025 11:27 AM
Hi folks,
controlling the order of plots in a multiplot waveform graph through the "active plot" property doesn't seem to work. I found a many years old thread saying that this is a bug. Nothing has changed since then? Am I wrong?
See the attached vi.
Best regards,
Peter
Solved! Go to Solution.
07-21-2025 11:38 AM - edited 07-21-2025 11:40 AM
There is nothing attached and you cannot change the plot order. The "active plot" property defines which plot you want to address.
(Also: If you found an old discussion, you should include a link)
07-22-2025 01:03 AM
I see! If the "I am not a robot" verification fails upload links are being deleted. Who'd expect such a behaviour?
There is absolutely no way to control the order of plots in a waveform graph?
07-22-2025 01:28 AM
Hi Ljewin,
@Ljewin wrote:
I see! If the "I am not a robot" verification fails upload links are being deleted. Who'd expect such a behaviour?
Everyone: there's so much SPAM in the forums nowaydays so there are some measures to handle possible SPAMmers…
@Ljewin wrote:
There is absolutely no way to control the order of plots in a waveform graph?
The "order of plots" is given by their order! 😄
The first plot is topmost, the last plot in the list is "most in the back".
You can decide which data is shown with plot0 and which data goes to plot1, plot2, and so on…
07-22-2025 03:32 AM
Yes, Gerd, I know "the order" is a somehow confusing term. But you understood what I mean! Apparently, the order of the plots in the legend and the order of the plots in the stack are strongly interlinked, correct? I wished I could leave the order in the legend as it is but rearrange the plots in the stack. That doen't seem to be possible.
Thanks,
Peter
07-22-2025 08:50 AM - edited 07-22-2025 08:55 AM
(Sorry, I cannot open your VI unless you do a "save for previous, 2020 or below)
With a bit of custom code, you can of course change the plot order (or anything else!). You simply need some code that rearranges the data AND rearrange the plot legend accordingly. (But yes, the legend and order are always synchronized).
To e.g. highlight a certain trace hidden behind other traces, you can increase its linewidth or temporarily change the visibility of the plot in front. You can even hide the legend and create a custom legend (e.g. an array of suitable clusters) that suits your purpose.
07-23-2025 04:14 AM
Just for completeness I am attaching the vi saved for LabVIEW 20 or below.
Thanks for your directions. At the moment the effort is not worth the benefit. I will simply permute the order of plots in the array and live with the legend with sub-optimal plot order. If I was asked for a wish -- the opportunity to control the plot order independently from the legend through a property node would be one.
07-23-2025 08:20 AM
Thanks for the VI. So what exactly do you want to see when the "active plot" ring is changed by the user?
(there is a bit of code smell: There are way too many value property nodes. Many are unnecessary and other should be change to local variables for efficiency. If you make your stop button latch action, no other code is needed for it. Why is the graph an control instead of indicator? etc...)
07-23-2025 08:50 AM
Here's a quick draft how to change linewidth It can easily be expanded for more functionality.
07-23-2025 09:21 AM
That's a very nice approach! The plot order in the stack is not actually being changed but only a very careful observer will realize this. Thank you very much!