# How to plot Loglinear histogram in mathematica for x and y data

I have an x and y data, x is in log scale and y is in linear scale. I am trying to plot the histogram between these two data. How to do it? and also how to customize the width of the individual rectangle of the histogram. Below is How I tried

data={{12.5,61.42},{16,56.81},{20,56.7},{25,57.62},{31.5,56.76},{40,63.88},{50,72.13},{63,76.55},{80,71.44},{100,61.58},{125,61.12},{160,52.84},{200,59.99},{250,58.84},{315,53.06},{400,55.39},{500,54.05},{630,52.82},{800,46.94},{1000,50.28},{1250.,54.56},{1600.,56.71},{2000,54.93},{2500.,52.53},{3150.,46.46},{4000,45.28},{5000,45.75},{6300.,45.14},{8000,42.27},{10000,43.35},{12500.,42.6},{16000,38.8},{20000,35.36}};


p[1] = Show[ Table[ListLogLinearPlot[data, Joined -> True,PlotStyle -> {Red, Thickness[0.002]}], {i, 1, Length[komodo]}], PlotRange -> All]

Histogram[data]

• A histogram is typically constructed with counts or relative frequencies. What are the units of data[[All,2]]? Those values sum to 1783.96. Do you want a BarChart rather than a Histogram?
– JimB
Nov 25, 2020 at 5:36
• Actually, I am plotting the sound levels in dB vs frequency in Hz. I don't know is it possible that if look at how both bar chart and histogram turn up and decide later? Nov 25, 2020 at 5:42
• I don't think a decision based on "I'll know it when I see it" should be satisfying.
– JimB
Nov 25, 2020 at 5:53
• Ok the standard practice in journal papers is to plot using the histogram. Nov 25, 2020 at 5:55
• Providing a journal example of what you want would get you more more targeted help.
– JimB
Nov 25, 2020 at 6:15

I wonder if something like this is what you’re after:

ListLogLinearPlot[
data,
Filling -> Axis,
FillingStyle -> Thickness[0.02],
Axes -> False, Frame -> True
]


• The x-axis is cutting the histogram at the bottom. Is it possible to overcome that? Nov 25, 2020 at 6:05
• @acoustics see edit. You can apply any of the usual plot styling and formatting of course (colors, etc). Nov 25, 2020 at 6:11
• I tried changing the color but it is not happening. how to make it work Nov 26, 2020 at 12:19
• @acoustic Use something like ‘FillingStyle -> Directive[Red, Thickness[0.02]]‘ Nov 26, 2020 at 14:31