05-27-2022 09:51 AM
Hello,
Is there an easy option to plot a graph with the value distribution in percent. I want to get something similar to in the picture. If I try to make myself, it will be big and chaos. Thanks
Solved! Go to Solution.
05-27-2022 09:56 AM - edited 05-27-2022 10:00 AM
You can change the format of the markers accordingly, e.g. "%.0f%%" (use the advanced formatting option)
05-27-2022 09:59 AM
05-27-2022 02:59 PM
These are the rms of weighted values. I have to show the percentage of each value from the list. I was thinking maybe there is a built-in function which is like histogram, but more specific to my need, then I don't have to program it.
05-27-2022 03:27 PM
Well, your problem description was not clear at all, because I took it as a cosmetic problem. To calculate a normalized integral, that would be an easy data operation. Start by attaching some simple data.
05-27-2022 04:06 PM
05-28-2022 04:47 AM
That's exactly what I need, but the code isn't quite clear. Could you please elaborate or upload an example if don't mind.
05-28-2022 06:23 AM
@mub.re wrote:
These are the rms of weighted values. I have to show the percentage of each value from the list. I was thinking maybe there is a built-in function which is like histogram, but more specific to my need, then I don't have to program it.
Well, there is a built in function like that. Surprisingly it is titled Histogram.vi
Altenbachs code is simply faster.
05-28-2022 06:28 AM
@mub.re wrote:
These are the rms of weighted values. I have to show the percentage of each value from the list. I was thinking maybe there is a built-in function which is like histogram, but more specific to my need, then I don't have to program it.
Well, there is a built in function like that. Surprisingly it is titled Histogram.vi
Altenbachs code is simply an extremely efficient way to scale and sum the counts of the bin outputs after passing the raw values through a histogram.
05-28-2022 08:35 AM - edited 05-28-2022 09:31 AM
@mub.re wrote:
That's exactly what I need, but the code isn't quite clear. Could you please elaborate or upload an example if don't mind.
The quality of my answer cannot be significantly better than the quality of the question (well, sometime I guess right and it is!).
Apparently, you have several analysis steps:
Initially, I thought you needed help with #4. Later I added a solution for 2&3, still assuming that you already have the histogram data. Now you are telling me that you also need help with #1. Who could have guessed!!!
I have asked you to attach some typical data, which you did not do, but would have cleared things up. I am not clairvoyant! Once you decide to attach some data, I will attach the full solution. Until then, it is a waste of my time to keep guessing what your problem really is.
Yes, LabVIEW has built-in functions to calculate histograms, but I would recommend an even simpler solution. What is the data range (0 to 0.1??)? How many bins do you want (100?)? Do you also need a bin for values that are outside the range? No matter what, the code is trivial and probably fits on a postage stamp. 😄