11-26-2017 04:29 PM - edited 11-26-2017 04:31 PM
Hello everyone!
I just started using LabView and have a question regarding the histogram VI. I have one assignment problem to complete, and I am practically done, except this one thing that's bugging me.
Basically, we flip four coins for a specific number of times and calculate the number of heads that are flipped each time. Then, we generate a histogram from that data. Now, notice the Bin center value array and the waveform graph don't match regarding the bin centers. Could somebody explain to me what did I do wrong here, and suggest some steps in correcting it? I want the bar centers to be at the values of the bin centers array (0,4 1,2 2 2,8 3,6).
Thank you,
Ivan
11-26-2017 04:46 PM
Not sure if this is what you want, but click on the plot legend and choose what bar plot you want.
You should also change your Total Number of Trials to an I32 number.
mcduff
11-26-2017 05:23 PM
Thank you for your response.
You see, no matter what kind of bar plot I choose, the centers of the bars are at numbers 0, 1, 2, 3 and 4 on the graph, but the values of x output of the histogram VI reports that the centers of the bars are at 0.4, 1.2, 2, 2.8 and 3.6. I want to figure out how to harmonize the graph with the histogram VI output.
11-26-2017 08:06 PM
Did you read the help for the function? It gives you the formula for determining the center.
mcduff
11-27-2017 02:53 AM
I understand that. What i dont understand is how to calibrate the waveform graph and make the centers of the bars at point specified by the X values output of the histogram VI. Let me show you what i mean. The current graph looks like this:
I want it to look like this:
Thank you for your time,
Ivan
11-27-2017 03:17 AM
11-27-2017 03:46 AM
Thank you. I had to simply create an indicator at the output of the histogram VI, instead of creating a waveform graph. That way, the x values are in place.