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.


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 acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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