I have the following problem. I have a pre-binned list that I want to plot. Here is a shortened example:
data:={{16.337, 0}, {18.92, 0}, {21.9105, 0.201491}, {25.374, 0.692208}, {29.3855, 1}, {34.0305, 0.849548}, {39.41, 0.512009}, {45.64, 0.240648}, {52.8545, 0.0905944}, {61.21, 0.0265148}, {70.886, 0.00539223}, {82.0915, 0.000554905}, {95.0685, 0}, {110.097, 0}, {127.501, 0}}
The first coordinate refers to the center of the bin and the second one is the count.
Typically I would use:
ListPlot[data, Joined -> True, InterpolationOrder -> 0, Filling -> Axis]
but this creates a histogram where the bins are not centered around the given numbers but rather begin there (as typically done and discussed in other question posts). Due to experimental reasons, the bins' widths increase exponentially, so I cannot just shift all the first coordinates. A possible workaround is to recalculate the beginnings of the bins separately and then feed them into the ListPlot, but I am wondering if there is a more automatic, built-in solution? Something that would work elegantly even if I have bins that have varying bin widths but I know their centers...
*the exponential binning is a result of the experimental equipment that was used (I didn't do the experiments myself, but was told that this cannot be changed). I don't understand why the machine was programmed this way, but there is nothing to do on that side. The data was normalised according to the highest column only to be able to plot relative comparisons between various experimental conditions.
Comments
Post a Comment