From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Plot.Plot Color Bug?

Solved!
Go to solution

I am puzzled about this. Check out the two almost identical VIs attached. Run the first one and try to change the Plot Color. The color property changes based on the color value. Do the same with the second VI (PlotColorWrong.vi). Try to change the color of the plot - it does not change!

 

Am I doing something wrong or is this a LV bug?

 

LV2009, SP1, Windows XP.

Download All
0 Kudos
Message 1 of 7
(2,514 Views)

Something seems corrupt. Resize the plot legend to show two plots, the resize it again to show one plot. Now it works.

 

(I would also recommend to set the active plot to zero first, to make sure the color is read from the correct plot. If you read the active plot in the bad VI, you'll notice that the active plot is 1 instead of zero)

0 Kudos
Message 2 of 7
(2,509 Views)

I do not get it. It's only one plot on each graph. I've resized the plot legend anyway but it does not seem to work.

 

To clariify, I want to see the value of the Plot.Plot Color indicator changed when I change the color of the graph on the second VI.

0 Kudos
Message 3 of 7
(2,499 Views)
Solution
Accepted by topic author wprice

As I said, your property node is looking at the second plot for some reason. Set the active plot to zero and things will fall into place.

 

 

Message 4 of 7
(2,494 Views)

What if I have several plots on the screen? How do I get their plot color?

 

Thanks!

0 Kudos
Message 5 of 7
(2,470 Views)

you would use a FOR loop, e.g. as follows:

 

 

Message 6 of 7
(2,459 Views)

Excellent - thanks a lot for your help!

0 Kudos
Message 7 of 7
(2,452 Views)