08-24-2009 03:52 PM
08-24-2009 04:03 PM - edited 08-24-2009 04:03 PM
There are at least 3 histogram vi's. Outlined in red below
08-24-2009 04:23 PM - edited 08-24-2009 04:25 PM
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.
08-13-2012 10:50 AM
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.
08-13-2012 11:04 AM
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.
10-09-2014 01:02 AM
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,
10-09-2014 01:39 AM
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?
10-09-2014 02:20 AM
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,
10-09-2014 06:29 AM
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,
10-09-2014 08:46 AM - edited 10-09-2014 08:48 AM
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!)