LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to plot a multiple XY graph showing the area between the curves as shaded (colored)

I want to generate multiple XY plots and want to show (e.g. colored) the area between the two selected curves. I am using LabView 8.

Thanks in advance for your help.
0 Kudos
Message 1 of 8
(8,293 Views)

Use the Fill Base Line option in the pop-up menu attached to the graph legend, and select the the curve to be used as "base line"

See the attached picture

Message Edité par chilly charly le 10-25-2007 12:26 PM

Chilly Charly    (aka CC)
Message 2 of 8
(8,291 Views)
Thanks for the hint. Could you please also tell me how to do this programmatically. For example, I am having four curves and only for the selected two of them I want to have the area between them to be shaded. Similar to below picture;


0 Kudos
Message 3 of 8
(8,283 Views)

That was quick isn't it ?

You can achieve the same result programmatically, using the proper property nodes. First select the active plot, then define the

associated plot to fill to. Additionnally, you can select a different color for the curves and the filled region : While selecting the color, press the space bar to select the curve color, the background color or both.

Enjoy.

Message Edité par chilly charly le 10-25-2007 12:47 PM

Chilly Charly    (aka CC)
Message 4 of 8
(8,278 Views)

That was too quick !

Your example is significantly more complicated, since there are some boolean logic behind.

I'm not sure this is something that can be done easily with LabVIEW. After some play with the drawing order of the various curves, I have been able to reproduce your example, but that's not very elegant :

Plots 0 and 1 are duplicates of plots 4 and 5 to improve the drawing (without these additionnal plots, the red and black lines almost disapear, hidden by the inter-curve filling). Line 2 fills to Line 5 (green to red in white). Line 3 fills to Line 4 (black to blue, in grey).

May be someone will comes with a better solution. Ben ?

Message Edité par chilly charly le 10-25-2007 01:45 PM

Chilly Charly    (aka CC)
Message 5 of 8
(8,265 Views)

The "Graph Master" is asking me!

I have to go look at getting a driver running under RT so I can't play right now, but...

If you have an off-screen graph that defines the background, you can do an invoke node get image and insert it as of of the image layers of the graph. That way the graph and all of the plots are not affected by the background graphic stuff.

I used a similar technique to add the circles to this image

that was aprt of this thread.

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 6 of 8
(8,248 Views)

I can see my favourite bear has very sensitive ears... 🙂

I'll have a look at this image layer stuff. Thanks Ben !

Chilly Charly    (aka CC)
Message 7 of 8
(8,244 Views)
" sensitive ears...  "
 
Far from it*!
 
I dreamed about this question last night so the title caught my eye.
 
Ben
 
*I was born with a sub-mucus cleft pallette and l lost my hearing as an infant. I get by with the 20% remaining in my right ear** combined with lip reading.
 
** Did you hear that using too much Viagra can affect your hearing?
 
Repeating
 
Did you hear that using too much Viagra can affect your hearing?
 
That jokes is much better delivered in person.
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 8 of 8
(8,235 Views)