LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Naming individual plots

Solved!
Go to solution

 

Hello,

 

I am looking for a way to name individual plots using the XY chart. So far I've been using the property node and only able to rename the "main" plot name. Is there a way I can feed an array of names to the plots? For example, index=0 corresponds to Plot 1, index=1 corresponds to Plot 2, etc. This would be especially helpful to do because I do not know how many plots will be generated prior to runtime. In the event that there are many plots (N is large), it would help tremendously with readability to be able to distinguish the plots. Thanks for the help! 

0 Kudos
Message 1 of 7
(2,865 Views)
No, you cannot feed an array of names so you have to iterate through the plots. As for not knowing how many plots, you can determine this directly from your data. Since you have a multiplot XY graph, the number of elements in the array is the same as the number of plots.
0 Kudos
Message 2 of 7
(2,852 Views)
Solution
Accepted by topic author Newbie217

Once you have an array of plot names, create a property node with the following two items in that order:

  1. active plot
  2. plot name

Now place this is a FOR loop and wire the iteration terminal to "active plot" and autoidex the name array and wire to "plot name".

 

 

(I would recommend to ignore errors within the node, else you get errors if you have more names than plots.)

Message Edited by altenbach on 01-08-2009 03:57 PM
0 Kudos
Message 3 of 7
(2,847 Views)
Thanks so much! That was exactly what I was looking for!
0 Kudos
Message 4 of 7
(2,841 Views)
Since you asked a good question I played with it a bit and came up with basically the Knights answer with a touch more functionality. Saved in LabVIEW 8.5.1
Now Using LabVIEW 2019SP1 and TestStand 2019
0 Kudos
Message 5 of 7
(2,832 Views)
The "LegNumRows" property needs to be set only once, and not N times. No big deal though. 😉
0 Kudos
Message 6 of 7
(2,830 Views)
I knew you'd get me somewhere. Originally I had 2 property nodes.Why oh Why did I change it? One of these days I'll make my goal. Rube Goldberg thread.Smiley Very Happy
Message Edited by GovBob on 01-08-2009 08:07 PM
Now Using LabVIEW 2019SP1 and TestStand 2019
0 Kudos
Message 7 of 7
(2,811 Views)