LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Color changing plot

I just finished a program and wanted to add a few things just to make it look nice.
One thing I wanted to do, if possible, is the following:
 
I have an XY chart.
Say, I have a range of 0 - 100.
Can I make the segment of line that is below 33 be red, 33-66 be yellow, 66-100 be green?
 
I would assume there is some property node that controls that, but I can't find it.
Thanks
Cory K
0 Kudos
Message 1 of 10
(4,365 Views)
I think the best way to do that would be to take your single plot and make it into plot three plots on your xy graph, with each plot representing one of the data ranges.  This way you can use a property node to change the color of each plot so that it is represented as you want.  The property you want is Plot>>Fill/Point Color.
0 Kudos
Message 2 of 10
(4,361 Views)

There is no way I can make the color change?

Cory K
0 Kudos
Message 3 of 10
(4,359 Views)
You can make the color change for each plot, but this would mean that your XY graph would have only one color.  By breaking your plot into three plots (0-33,34-66,67-100?) you can color each individually by using a property node, setting the active plot and then changing the fill/point color.
0 Kudos
Message 4 of 10
(4,357 Views)
jmcbee is right.

I would test every value for it's range and replace it with NaN if it's in the wrong range.

Ton
Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
0 Kudos
Message 5 of 10
(4,355 Views)

Ton,

I've made an example based on your description. Here it is for reference.

Message 6 of 10
(4,328 Views)

OK, i misunderstood what you said.
I thought you meant to have 3 seperate graphs.

That looks like it will work great.
Thanks for your help.

Cory K
0 Kudos
Message 7 of 10
(4,300 Views)

Hey Tobin, do you think you could attach that file as a .vi instead of png.
I am having a hard time seeing all of the things you did.

Thanks,
Cory

Cory K
0 Kudos
Message 8 of 10
(4,284 Views)
Cory,
 
Here it is in ver 8.5.
Sorry it took so long, I was out on Friday and I did not check back until this morning.
 
Tobin
Message 9 of 10
(4,252 Views)
Thanks, that was a lot of help.
Cory K
0 Kudos
Message 10 of 10
(4,200 Views)