10-08-2013 12:45 PM
Cameron,
Now I have run your VI. It is ingenious and I wouldn't have thought of it. However, it does not do what I was seeking, because it DOES change the order of array elements going in to the plot. In your VI, the white "plot 0" is always in front. It is easier to see this if you make the lines really thick. But the data being plotted as "plot 0" keeps changing in your VI. If the labels really meant something (such as position, velocity, acceleration) then I'd also have to change the plot labels each time I change the plot order, with your VI, to keep the labels correct. That could be done with property nodes, but it would get complicated.
Thanks for your help.
Bill
10-08-2013 01:00 PM
Oh, but you haven't run my optimized VI, which is in my last post. It does, I think, what you want, with the possible exception of keeping the top right legends in a consistent order (they are right, however). The property node thing for swapping colors around is no big deal - you just have to wire it exactly backwards of the plot ordering wires. It's all there.
Cameron
10-08-2013 01:15 PM
Cameron: I am impressed. Your new and improved VI keeps the labels and colors associated with each data set, as the order is altered. It would be nice if one could just click on a trace and select "Move forward" or "Move backward". But we can't, and you have provided an alternative method. Thank you.
10-08-2013 01:29 PM
Oh, you could, but I didn't.That's the situation which an author would "leave as an exercise to the reader". A drag-and-drop control might also be fun to use there, but I don't have any experience with those (check back in a month or so, that's the next thing I have to implement in my UI's).
You know, probably a better way than using an enum on that would be to use a ring control, because you can get a drop-down listing of all the possibilities (at least the ones you included in the ring) to choose from, instead of having to cycle through them one at a time.
Cameron
10-08-2013 01:35 PM
Hi Cameron,
you don't have to "cycle through" an enum, you can also select from a list of entries here.
Using drag&drop is very easy with a listbox, it has that feature built-in - just check the settings with a right-click...
10-08-2013 01:40 PM
Thanks, Gerd, it'll be nice if something in LV is easy right-out-of-the-box (and I'm not including Express VI's in that category) for a self-taught programmer (although I did take Core1 and 2 when I had the chance - they were invaluable).
Cameron
10-08-2013 01:53 PM
Your last example does work a whole lot better.
It still proves that Jeff was right, and that you can't do this without changing the order of the plots in the legend, which is was what the OP did not want to do.
But your idea of creating a static legend would be one way of making it appear that the order as not been changed. It's not ideal. And you lose the ability to do some things that are built into LabVIEW such as change plot visibility unless you want to do a whole lot more programming.
10-08-2013 01:58 PM
Those are good points, RavensFan.
10-08-2013 02:12 PM
Thanks, RF.
But, as far as my "static legend" workaround being "not ideal," Sure, I know it isn't, but I don't think I've ever done an "ideal" thing in my life. It's just a workaround to present an example of what you could do if that's the kind of thing Bill was looking for. I just look at the legend as a quick way to identify the specific plots, and that, to me, would be the quickest to follow.
Besides, I'm still on a pretty steep part of the LV learning curve, a lot more climbing to go.
Cameron