LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to impose that a XY plot is on top ?

Hi all,

 

I use a XY graph to plot a bar graph (an histogram). Then, I want to fit this histogram with a Gaussian Peak and superimpose the result of the fit on top of the histogram. When I do this (see the picture below), the Gaussian peak is always hidden behind the histogram (see the second picture). Is there a way to force the histogram in the background and the result of the fit on top of it ?

 

Thanks for your help !

 

Capture d’écran 2016-02-16 à 13.38.10.png

 

 

 

Capture d’écran 2016-02-16 à 13.45.15.png

____________________
JB
0 Kudos
Message 1 of 8
(4,033 Views)

Hi tycho,

 

make your fitted plot the first in the array - right now it is the last.

Do you get the idea? The plot order in the array corresponds to the Z order in the graph display…

Best regards,
GerdW


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

Hi GerdW,

 

That's the first thing I tried, actually, but it's a mess with the different styles (lines, colors, etc.) I want to have for the histogram and for the fitted Gaussian...

When I put the fitted Gaussian at the beginning of the array, it takes the style of the histogram which was previously in the table and the histogram takes the style I wanted to have for the Gaussian...

I'll think a little bit more. 

 

Thanks for your answer !

 

____________________
JB
0 Kudos
Message 3 of 8
(4,004 Views)

Hi tycho,

 

point 1: Z order in the graph is provided by array index of the plot data

point 2: you need to set each plot's properties

 

There' s no way around it when you want to have a graph display according to your requirements…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 8
(4,000 Views)

Hi Gerd,

 

Ok.

Is there a way to programmatically set the style for each graph ?

 

Cheers

____________________
JB
0 Kudos
Message 5 of 8
(3,993 Views)

Hi tycho,

 

yes, there is.

Spoiler
Use property nodes of the graph! There should be an example VI explaining how to use them…
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 6 of 8
(3,989 Views)

Hi Gerd,

 

Ok, but when there are several graphs, which one is modified by the property node ? The one on top ?

 

Cheers

____________________
JB
0 Kudos
Message 7 of 8
(3,971 Views)

Hi tycho,

 

there's a property named "active plot".

Guess what it's for… 😄

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 8 of 8
(3,960 Views)