LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I programmatically change the plot legend names on my xy graph?

I have a need to change the names/labels on my XY Graph's Legend at run time.  This is because plot 0 is not always the same set of data.  I have searched high and low for a couple days now to no avail.  The closest thing I've seen is overlaying a string over the plot legend, but I would prefer to do change the property of this box.  Any help would be appreciated.
0 Kudos
Message 1 of 16
(22,947 Views)
Hi Superlux,
try this:



Greets, David

Message Edited by daveTW on 06-13-2007 05:56 PM

Greets, Dave
Message 2 of 16
(22,940 Views)
  1. Right click on the Graph >> Create Property Node >> Active Plot
  2. Right-click on the lower part of the property node >> Add Element (you can also resize the property node by pulling its lower border down)
  3. Click on the lower property >> Plot >> Plot name
  4. Right-click on the upper part of the property node >> Change All To Write
  5. Wire the number of the plot to ActPlot and the name to Plot.Name

Message 3 of 16
(22,939 Views)
One time in picture and one time in text... daveTW sent his answer while I was typing mine !

Message Edité par JB le 06-13-2007 06:05 PM

Message 4 of 16
(22,935 Views)


@JB wrote:
One time in picture and one time in text... daveTW sent his answer while I was typing mine !


Once again the forums are to the rescue!
---------------------
Patrick Allen: FunctionalityUnlimited.ca
0 Kudos
Message 5 of 16
(22,923 Views)

So it looks like we have a virtual tie.

So now for the tie-breaking question (are you ready?)

When using a waveform datatype with charts and graphs, what property should you check if the previous suggestion does not work?

Ben

 

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 6 of 16
(22,910 Views)
Hello Ben,
with waveforms this also works for me fine. So where is the pitfall? (if always all works fine, one don't really gets experience)
greets, Dave


P.S. @ J.B. I used the Code Capture Tool from the Starware Thread, this made me so fast. If I could do, I would give it five stars each time I use it.

Btw. would it be possible to programmatically give ratings with LV? Here it should be used. Thanks again to tst & the others Smiley Very Happy

Message Edited by daveTW on 06-14-2007 09:13 AM

Greets, Dave
Message 7 of 16
(22,894 Views)

Ah but if your waveform had attributes...

then the "ignore attributes" option would prevent the graph/chart from using the names included as one of the WF's attributes.

I believe if you use DAQmx channels, these come automatically.

Ben

PS Yes you can give stars with LV.

Message Edited by Ben on 06-14-2007 06:06 AM

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 8 of 16
(22,880 Views)
P.S. @ J.B. I used the Code Capture Tool from the Starware Thread, this made me so fast. If I could do, I would give it five stars each time I use it.

I have been using a very nice tool called HyperSnap for years. But most of the times - at least if I don't know anything about the LV level of the author of the question - I prefer to describe the exact procedure to follow.

0 Kudos
Message 9 of 16
(22,870 Views)

you guys are awesome!

 

thanks for bringng this up. 

0 Kudos
Message 10 of 16
(22,355 Views)