LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 
Reply

Can labview display a histogram plot of data?

Highlighted
I want to know how I can display a histogram of data?
0 Kudos
Message 1 of 19
(16,348 Views)

There are at least 3 histogram vi's.  Outlined in red below

untitled.PNG

Message Edited by elset191 on 08-24-2009 04:03 PM
--
Tim Elsey
LabVIEW 2010, 2012
Certified LabVIEW Architect
Message 2 of 19
(16,346 Views)

If you already have histogram data (and it seems you do!), just use a waveform graph with one of the bar plot styles. Make sure to adjust x0 and dx. so the x-axis is correct.

 

If you need to calculate the histogram first, use Tim's suggestion.

 

Maybe you should attach a small VI containing typical data so we can better see what you need to do.

Message Edited by altenbach on 08-24-2009 02:25 PM

LabVIEW Champion Do more with less code and in less time
Message 3 of 19
(16,338 Views)

How can I display the values from an 8x8 table (in the form of a 2-D array , all double values) onto a histogram?

So the y-axis would be ROW1 and the x-axis would be COL1 - COl8, each displaying their value.

 

I am looking to create 8 separate histograms in the end (one corresponding to each row)

 

I have tried using the CreateHistogram.vi, and passing the table of values as the signal input. Labview automatically adds a "dynamic data type" for me,  which I'm not sure how to use.And the output is connected to a histogram chart.

 

But the chart does not display the correct values. I am not sure what you mean by "calcualte the histogram values first"

 

Thanks!! : )

 

I've attached an image of what Ive done so far.

0 Kudos
Message 4 of 19
(15,147 Views)

This will convert to dynamic data if (and only if!) you use express VIs.

 

If your data is already a histogram, using histogram tools does not make much sense, unless I misunderstand.

If you have an 2D array with histogram data, you can just use index array (resized for 8 rows or columns) and wire to your 8 graphs. Alternatively, you could wire your 2D array to a intensity graph and see all data in one box.

 

If you want to create a histogram of each row, use an autoindexing FOR loop and use low level histogram tools, creating the 8 histograms, one for each row data. Then use index array to get the 8 histograms to be wired to the 8 graphs.

 

Your image is useless. Please attach a small VI containing your 8x8 2D array as a diagram constant, for example. Then tell us what you want to see.

 

 


LabVIEW Champion Do more with less code and in less time
0 Kudos
Message 5 of 19
(15,131 Views)

hello...

i have 1024 byte data which comes from daq every iteration. i have to plot it as histogram and update for every iteration and have to achieve max speed. i am using pci-6534. data length may be changed. so plz tell me how to prepare histogram data first and show it on graph.

 

thanks and regards,

0 Kudos
Message 6 of 19
(11,678 Views)

Attach your actual VI and some typical data, then tell us what you actually want to display. Your code picture is pretty useless for us because it does not tell us how the data looks like or where it comes from. What is the difference between "data", "graph data", and "graph data 2"? What is the datatype?

 

A histogram typically shows the count at which certain value ranges occur. Is the valid range of your data 0..1024?

If speed matters, eliminate the current coercion dots and use shift registers to accumulate the data instead of local variables.

 

The fastest histogram uses an array of given fixed size in a shift register and an in-place element structure incrementing bins as a function of the values in the array. Use a plain waveform graph instead of an xy graph.

 

Should the histogram reset with every call or should it accumulate over time. Should it be normalized for the number of counts so it does not grow over time?

 

 


LabVIEW Champion Do more with less code and in less time
0 Kudos
Message 7 of 19
(11,672 Views)

i am getting data from 10 bit adc. so its range is from 0 to 1024. i readit from daq.

in last snapshot data is a reading for that particular instance and graph data is buffer in which i sum all data reading. i guess i am wrong here.

 

----------------------

If speed matters, eliminate the current coercion dots and use shift registers to accumulate the data instead of local variables.

 

The fastest histogram uses an array of given fixed size in a shift register and an in-place element structure incrementing bins as a function of the values in the array.

------------------

 

sir i am not understanding it. i will read about it . but possible help me here...

 

----------------------

Should the histogram reset with every call or should it accumulate over time. Should it be normalized for the number of counts so it does not grow over time?

-----------------------

no histogram should accumulate all data. it should show graph for full session.

 

i am attaching my data file. it just a example because i am giving it fix to port.

thanks and regard,

0 Kudos
Message 8 of 19
(11,667 Views)

hey all...

i attached code which i am using to plot histogram. here data comes directly from daq. every time i just append it in array. now its working bt constrain is speed. it takes 3 sec for update and i am also saving datafile in spreadsheet.

so plz tell me how can i get better performance. 

 

thanks and regards,

0 Kudos
Message 9 of 19
(11,640 Views)

Since you have a finite number of consecutive integers starting with zero, it is much simpler to use my method to create a histogram.

 

Attached is some simple demo code (LV 2010) that averages N points of data and also keeps a running histogram of the generated data. See if it makes sense. See, no local variables at all!

 

 

(See, since you hijacked an old thread instead of starting a new one, you cannot mark the solution. You should always start a new thread!)

 


LabVIEW Champion Do more with less code and in less time
Message 10 of 19
(11,619 Views)