Hi everyone and sorry for my english, I'm new to Mathematica. I have a problem combining points with histograms in Mathematica 12.0.
I would like to display a frequency histogram along with points placed in the center of each bin. My ultimate goal is to put together a histogram with its Gaussian approximation.
I tried using Show
to display them together but the points are not centered in the bins and moreover the histogram is moved to the right. At this point, I would have another question to ask you: how can I create a Gaussian curve starting from Gaussian points (with ListLinePlot
the graph is broken and I don't like it)? Here is the code of my attempt.
Thank you in advance.
istomax900 ={{0.0246604, 4}, {0.0258038, 3}, {0.0269472, 6}, {0.0280907,
14}, {0.0292341, 21}, {0.0303775, 14}, {0.0315209, 12}, {0.0326643,
10}, {0.0338078, 11}, {0.0349512, 6}}
gaussianamax900={{0.0246604, 1.57199}, {0.0258038, 3.60887}, {0.0269472,
6.88537}, {0.0280907, 10.9177}, {0.0292341, 14.3863}, {0.0303775,
15.7544}, {0.0315209, 14.338}, {0.0326643, 10.8445}, {0.0338078,
6.81618}, {0.0349512, 3.5606}}
Histogram[WeightedData @@ Transpose[istomax900], Length[istomax900]]
Show[ListPlot[gaussianamax900],
Histogram[WeightedData @@ Transpose[istomax900], Length[istomax900]]]
Histogram[WeightedData @@ Transpose[istomax900], Length[istomax900], Epilog -> {Red, Point[gaussianamax900]}]
do what you want? $\endgroup$