LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

changing the color of a graph dependent on data?

Is there any way that I could change the color of a sinewave on a graph to correspond to its data collection point? I have an idle state that runs a sinewave graph continuously. I'd like to change the line color of the sine wave at the point in which my program starts collecting data of that particular sine wave. Any thoughts?

0 Kudos
Message 1 of 17
(3,770 Views)

You can modify the plot color of a particular plot on your graph using a property node.  Just write the color you want to the Plot.Color property.

 

Dan

0 Kudos
Message 2 of 17
(3,763 Views)

a sample vi with color plot alternating...

0 Kudos
Message 3 of 17
(3,756 Views)

I think the OP is asking if you can change a portion of the graph based on a certain time threshold.

>

"There is a God shaped vacuum in the heart of every man which cannot be filled by any created thing, but only by God, the Creator, made known through Jesus." - Blaise Pascal
0 Kudos
Message 4 of 17
(3,744 Views)

Vt is right, technically. I want the graph to spilt colors at the point of data measurement. Is there another way to see where on the graph I started to collect data?

0 Kudos
Message 5 of 17
(3,739 Views)

You could do an XY plot and just change from Plot0 to Plot1 at the transition point.

 

 

 

>

"There is a God shaped vacuum in the heart of every man which cannot be filled by any created thing, but only by God, the Creator, made known through Jesus." - Blaise Pascal
0 Kudos
Message 6 of 17
(3,732 Views)

Would cursors help ?

I added a cursor manually, and using property nodes you can set it to whereever in the time scale. Hope it helps?


Kudos are the best way to say thanks 🙂
0 Kudos
Message 7 of 17
(3,726 Views)

mmm, yes. A cursor would work great! How would I consider the time at which my measurements start?

0 Kudos
Message 8 of 17
(3,722 Views)

Can you post your VI if you have it ?

 

If you use a State machine, you could control when your measurements start and set the cursor position accordingly ? Or Like someone suggested, use XY plot for the transition which might look better visually. 


Kudos are the best way to say thanks 🙂
0 Kudos
Message 9 of 17
(3,717 Views)

it's kind of finicky, but here it is. it starts recording data when the digital input becomes high twice.

0 Kudos
Message 10 of 17
(3,703 Views)