LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

point by point histogram with integer spaced bins

Hi,

 

I want to use point by point histogram to plot a histogram of the last x data points, coming directly from a sensor.

My problem now is, that the data is integer only and the auto generated bins are not integer aligned.

Also the data is changing over time, so I cannot give a min, max or fixed bins.

(I can walk through the whole range of the sensor, but at a time I am only around a small point)

Has anyone a solution?

0 Kudos
Message 1 of 4
(3,383 Views)

Hi MartinKittel,

 

can you please post a piece of LV code and a picture of your histogram to show what you do and get exactly. Are you talking about the x-axis or y-axis, when you say that the bins are not integer aligned? Thank you for the further information.

 

Best regards,

 

annav

Anna Vogl
Certified LabVIEW Developer
0 Kudos
Message 2 of 4
(3,354 Views)

Hello,

I mean the x axis.

Capture.PNG

 

I think the holes are there because the bins are not integer alligned.

The code is the folloving:

 

reset, sample length, input1, input2

Capture.PNG

 

0 Kudos
Message 3 of 4
(3,347 Views)

Hi MartinKittel,

 

you did not specify the intervals input. So the number of bins is 10 by default. That is why you have 10 bins over all the amount of data. It looks like the intervals are not integer aligned but as you have varying input data the center values of the intervals change. I don't exactly know what you want to do with the data you get, but the histogram gives you a rough idea of how many times a value appears in your dataset. If you adjust the intervals the display will change.

 

See also this for information.

 

Do you have any further questions?

 

Best regards,

 

annav

Anna Vogl
Certified LabVIEW Developer
0 Kudos
Message 4 of 4
(3,317 Views)