From Friday, January 17th 11 PM CDT (January 18th 5 AM UTC) through Saturday, January 18th 11:30 AM CDT (January 18th 5:30 PM UTC), 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: 

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,080 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,070 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,051 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,047 Views)

Hi Gerd,

 

Ok.

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

 

Cheers

____________________
JB
0 Kudos
Message 5 of 8
(4,040 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
(4,036 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
(4,018 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
(4,007 Views)