Jump to content

create a graph-histogramm ?


alexum

Recommended Posts

Hi everybody,

I'm a total beginner in labview and i work on an experience that takes data by acquisition.

I'd like to create a graph that works online, i mean that update a graph every time that data is coming, puting the value received in x axis, and in y axis, the statitic on the values increasing...The best thing would to have an histogramm, i mean to create also a binning for this graph.

I have no idea how to proceed, do you know if it is possible ?

Thank you very much in advance for you help.

Cheers,

Alexum.

Link to comment

Hi Alexum:

There is a binsort function (From the wiring diagram Functions>Analyze> Mathematics> Probability and Statistics> Hisogram.vi.

Unfortunately, depending on your data sample rate and duration of the file, it might be very ineffiecient to display the data in real time as it is collected.

A somewhat better approach, that displays real-time, but avoids storing an array of all the samples which continually increases in size, is shown in the attached picture. (I hope the picture is attached, I don't see it in the preview, but I'll get it to you in a later post if its missing.)

I know there are more elegant ways to do this, but what I'm showing should be at least reasonably efficient and conceptually simpler for the new user than some of the other approaches.

I've left out some details, handling off-scale data, might need to add 1/2 to the scaled data to get bins centered properly, etc. but the sketch should give you a starting point as to how to proceed.

I'm working in LV7.1, and don't have 6.1 installed anywhere now, but I think most of the features I'm using are available in 6.1 too.

Hope this helps & Best Regards, Lou

post-1144-1102019133.png?width=400

Link to comment

Hi,

thanks again for your answer.

I just to give a try but i have 2 problems.

The first one is about the array at the left side. I have created an array as a constant.

It has the same aspect than your but not in blue and i cannot see the zeros inside...

Moreother, i cannot find how to put the blue arrows on the structure ?

And my second pb is that i cannot find the waveform Graph that you indicate. If i click on the pannel Gragh, i don't see any symbol corresponding to yours...?surely, i did'nt look at the right place or something like that ? (i tried also to search in the pannel Waveform).

Thank you for your help.

Cheers,

Alexis

Link to comment

Hi Todd ands louis manfredi,

it seems that i don't have the same options with the right click, maybe my version is too old.

Anyway, i took an initialyse array instead of and a graph.

And it works very well, thanks very much.

Only one thing more, on my graph, i can see for each value incoming, a triangular pictured. Do you know if it is possible to have a rectangular instead of ?

Thank you very much,

Cheers,

Alexum.

Link to comment
...it seems that i don't have the same options with the right click, maybe my version is too old....

2975[/snapback]

LV 6.1 should have all the right-clicks you need. One tricky thing with arrays :thumbup: -- if you right click on the array container you get one set of options, if you right click on an array element itself, you get another. (In order to change the variable type, you want to click exactly on an array element, not just on the overall array graphic.)

In this case, your use of the array initialize is better anyhow, since that way you can more easily (even at run time if you want) change the number of bins in the array.

...Only one thing more, on my graph, i can see for each value incoming, a triangular pictured. Do you know if it is possible to have a rectangular instead of ?

2975[/snapback]

You should be able to right-click on the legend for the graph, and pick bargraph display. (See the attached picture.) Then, in a nearby area of the popup menu, select Interpolation>None to turn off the lines between the points.

post-1144-1102510156.png?width=400

Best luck, Lou

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.