There is a bug in ListStepPlot, which I reported to Wolfram and they are working on a fix. Until then, I wrote a simple workaround and thought I might share this with people, in case you encounter the same problem.

The bug appears when ListStepPlot is used with both PlotMarkers and ScalingFunctions set to non-default values. For example

ListStepPlot[Table[p Range[6], {p, {3, 7, 11, 13}}], "Center", 
  PlotMarkers -> Automatic, 
  ScalingFunctions -> "Log"


a plot with bad markers

I provide a simple temporary bug-fix in my answer.


1 Answer 1


A workaround is to apply the rule

 GeometricTransformation[Inset[Style[m__], {0., 0.}], tr_] :>
  GeometricTransformation[Inset[Style[m], {0., 0.}], 
   If[#[[1, 2]] == 0, Nothing, {{#[[1, 1]], Log[#[[1, 2]]]}}] & /@ tr]

to the created figure. For example

ListStepPlot[Table[p {1, 2, 3, 0, 4, 5, 6}, {p, {3, 7, 11, 13}}], 
  "Center", PlotMarkers -> Automatic, 
  ScalingFunctions -> "Log"] /. BUGFIXRULEListStepPlotLog


enter image description here

When other scaling functions are used, the bug-fix needs to be adjusted (replace Log by whatever is needed), but the general procedure should work in any case.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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