From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, 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: 

Manipule Color of plot

Solved!
Go to solution

Hello, I am working with a graph and I am looking for the way that by means of a button allows me to change the color of the signal, that is to say to control the color. Regards

0 Kudos
Message 1 of 10
(2,053 Views)

Hi Jp,

 

use a color property of the plot.

(Don't forget to set the ActivePlot before changing properties for a specific plot!)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 10
(2,011 Views)

You can click the plot in the plot legend and change the color. If you need it programmatically the answer is above.

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 3 of 10
(2,005 Views)

Hi, ineed to do it by means of a button, to manipulate it at will

 

 

0 Kudos
Message 4 of 10
(1,986 Views)

That is what this is for:

FireFist-Redhawk_0-1596725952866.png

 

Redhawk
Test Engineer at Moog Inc.

Saying "Thanks that fixed it" or "Thanks that answers my question" and not giving a Kudo or Marked Solution, is like telling your waiter they did a great job and not leaving a tip. Please, tip your waiters.

0 Kudos
Message 5 of 10
(1,975 Views)

I need to control the color with a button

0 Kudos
Message 6 of 10
(1,972 Views)

That is a button...

FireFist-Redhawk_0-1596731771608.png

 

Redhawk
Test Engineer at Moog Inc.

Saying "Thanks that fixed it" or "Thanks that answers my question" and not giving a Kudo or Marked Solution, is like telling your waiter they did a great job and not leaving a tip. Please, tip your waiters.

0 Kudos
Message 7 of 10
(1,958 Views)

I need to do with a boolean or push button, no with that

0 Kudos
Message 8 of 10
(1,954 Views)

@Jp16 wrote:

I need to do with a boolean or push button, no with that


Then the answer that GerdW gave you is what you need. Do you have a more specific question? Have you tried implementing this and ran into problems? Please feel free to post some code for help.

0 Kudos
Message 9 of 10
(1,941 Views)
Solution
Accepted by topic author Jp16

Plot Color.pngHere's a little example.  Note that the Active Plot parameter (ActPlot) is above the Plot.Color parameter.  The property nodes are read top to bottom so set the active plot, then change it's parameter.

LabVIEW Pro Dev & Measurement Studio Pro (VS Pro) 2019 - Unfortunately now moving back to C#, .NET, Python due to forced change to subscription model by NI. 8^{
0 Kudos
Message 10 of 10
(1,917 Views)