# ListPlot with log scale in x axis

This is the list with the points I will use

points = {{1, 1.34795, 0.054925}, {1.34795, 1.81697, 0.0469403},
{1.81697, 2.45792, 0.044499}, {2.45792, 3.32495, 0.0447266},
{3.32495, 4.48188, 0.0460946}, {4.48188, 6.08446, 0.04784},
{6.08446, 8.17245, 0.0495524}, {8.17245, 11.0161, 0.051065},
{11.0161, 14.9551, 0.0523605}, {14.9551, 20.1587, 0.0534072}, {20.1587, 30, 0.05435}}


each element of this list {a,b,c} contains

• a = left point of the bin
• b = right point of the bin
• c = height of the bar

Then, I create the following histogram

ListPlot[points[[All, {2, 3}]], Joined -> True, PlotStyle -> None,
Prolog -> {Opacity[0.2], EdgeForm[Black], Rectangle[{#[[1]], 0},
{#[[2]], #[[3]]}] & /@ points}, AxesOrigin -> {0, 0}]


How to set the Log scale on the x-axis? I tried with ListLogLinearPlot

ListLogLinearPlot[points[[All, {2, 3}]], Joined -> True, PlotStyle -> None,
Prolog -> {Opacity[0.2], EdgeForm[Black], Rectangle[{#[[1]], 0},
{#[[2]], #[[3]]}] & /@ points}, AxesOrigin -> {0, 0}]


but it returns a wrong result

• What exactly is wrong? The x-axis is in log scale Jan 30, 2017 at 18:48
• I think it is a bug. I can reproduce the issue with version 11.0.1 in Win 7 Pro. The same happens for ListPlot with the ScalingFunctions option. Jan 30, 2017 at 18:59
• @Felix Notice that the first 4 bars are missing and that the bar heights are decreasing when they should be increasing. Jan 30, 2017 at 19:01

You need to manually Log the coordinates for the Rectagle:
Show[ListLogLinearPlot[points[[All, {2, 3}]], Joined -> True,