- Community Home
- :
- Discussion Forums
- :
- Most Active Software Boards
- :
- LabVIEW
- :
- Can labview display a histogram plot of data?

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Topic Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

Highlighted

08-24-2009 03:52 PM

Options

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

I want to know how I can display a histogram of data?

08-24-2009 04:03 PM - edited 08-24-2009 04:03 PM

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

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

Message Edited by elset191 on 08-24-2009 04:03 PM

--

Tim Elsey

LabVIEW 2010, 2012

Certified LabVIEW Architect

Tim Elsey

LabVIEW 2010, 2012

Certified LabVIEW Architect

08-24-2009 04:23 PM - edited 08-24-2009 04:25 PM

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

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

08-13-2012 10:50 AM

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

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

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

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-08-2014 01:02 AM

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

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-08-2014 01:39 AM

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

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

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

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

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

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

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

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!)*