Anyone know how to impose a log scale on both the $x$ and $y$ axes after using ListStepPlot?

There's nothing special about the data set I've used, just a list of 15 ordered pairs that I need to display in a histogram-like manner in a log-log graph. Below is a picture of the graph that I've created, but I can't find any graphics options that will let me show this in a log-log scale.

enter image description here

  • $\begingroup$ ListLogLogPlot[{1, 2, 3, 4, 5}, Joined -> True, InterpolationOrder -> 0, Filling -> Axis] $\endgroup$ – BlacKow Mar 15 '16 at 21:06
  • 1
    $\begingroup$ Is it a separate question or related to this? $\endgroup$ – BlacKow Mar 15 '16 at 21:08
  • $\begingroup$ And regarding InterpolationOrder->0 find very useful discussion here $\endgroup$ – BlacKow Mar 15 '16 at 21:14
  • 1
    $\begingroup$ Have you tried ListStepPlot[yourdata, ScalingFunctions -> {"Log", "Log"}]? $\endgroup$ – MarcoB Mar 15 '16 at 21:24
  • 2
    $\begingroup$ @MarcoB that's new in v10.4. :) $\endgroup$ – rcollyer Mar 16 '16 at 2:33

In version 10.4 the use of ScalingFunctions has finally been documented with ListStepPlot (as mentioned by @rcollyer in comments). It seems to work fine to do what you want.


  RandomReal[{0, 0.1}, 15], DataRange -> {0, 19},
  Filling -> Axis, Frame -> True,
  ScalingFunctions -> {"Log", "Log"},
  GridLines -> Automatic

Mathematica graphics

I noticed that you posted another similar question regarding the disappearance of ticks on the log vertical axis. Since ListStepPlot was introduced in 10.2, you must have either version 10.2 or 10.3, but possibly not 10.4. Perhaps you would be able to upgrade. In any case, it would be best if you shared the exact code that is giving your trouble.

| improve this answer | |
  • $\begingroup$ The same code gives less than pretty, but quite equivalent output here on version 10.2. It's mainly troubled by the Filling option, but a setting of -10 puts it back to normal. $\endgroup$ – LLlAMnYP Mar 16 '16 at 11:02

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.