Skip to main content
7 of 11
edited tags
Alexey Popkov
  • 62.3k
  • 7
  • 154
  • 375

Functional defined Ticks of LogLinearPlot does not work

Bug introduced in 10.0 and persisting through 10.3 or later


version 10

$Version

"10.0 for Microsoft Windows (64-bit) (June 29, 2014)"

Consider three cases in LogLinearPlot's option Ticks

findDivisions[{x1_, x2_}, n_] := FindDivisions[-Log[10, #] & /@ {x1, x2}, n]
myTicks[x1_, x2_] := {10^-#, #} & /@ findDivisions[{x1, x2}, 10]

p1 = LogLinearPlot[Log[10, x], {x, 10^-10, 10},
   Ticks -> {myTicks[10^-10, 10], Automatic}];
p2 = LogLinearPlot[Log[10, x], {x, 10^-10, 10},
   Ticks -> {myTicks, Automatic}];
p3 = LogLinearPlot[Log[10, x], {x, 10^-10, 10},
   Ticks -> {Function[{x1, x2}, {10^-#, #} & /@ 
       findDivisions[{x1, x2}, 10]], Automatic}];
Grid[{{"p1", "p2", "p3"}, {p1, p2, p3}}, Frame -> All]

enter image description here

p1 is right.

p2 is wrong with message "Tick specification must be a list or a function"

p3 is wrong with FindDivisions's error

here is related

version 9

$Version

"9.0 for Microsoft Windows (32-bit) (January 24, 2013)"

All three cases well worked!

Blockquote

Junho Lee
  • 5.2k
  • 1
  • 17
  • 34