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


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


  • $\begingroup$ 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? $\endgroup$ – JimB Nov 25 '20 at 5:36
  • $\begingroup$ 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? $\endgroup$ – acoustics Nov 25 '20 at 5:42
  • $\begingroup$ I don't think a decision based on "I'll know it when I see it" should be satisfying. $\endgroup$ – JimB Nov 25 '20 at 5:53
  • $\begingroup$ Ok the standard practice in journal papers is to plot using the histogram. $\endgroup$ – acoustics Nov 25 '20 at 5:55
  • $\begingroup$ Providing a journal example of what you want would get you more more targeted help. $\endgroup$ – JimB Nov 25 '20 at 6:15

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

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

simulated histogram

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.