Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

This is similar to the closed topic: Frame ticks for a Log Log plot [closed]. Let me reuse (rm -rf)'s example here.

FrameTicks given through Show does not appear if used with LogLogPlot:

Show[
  LogLogPlot[x^2 + x^3, {x, 1, 100}, Frame -> True],
  FrameTicks -> {{All, None}, {{10, 30, 75}, None}}
]

This works though:

Show[
  LogLogPlot[x^2 + x^3, {x, 1, 100}, Frame -> True],
  FrameTicks -> {{All, None}, {{N@Log@#, #}& /@ {10, 30, 75}, None}}
]

Is this a bug or an expected behaviour?

share|improve this question
add comment

1 Answer 1

up vote 4 down vote accepted

This is not a bug, but a difference in how the ticks are processed. When given as part of LogLogPlot, they are scaled before they are displayed. You can see this if you extract them from the Graphics object:

LogLogPlot[x^2 + x^3, {x, 1, 100}, Frame -> True, 
   FrameTicks -> {{All, None}, {{10, 30, 75}, None}}] /.
 Graphics[_, opts : OptionsPattern[]] :> (FrameTicks /. Flatten@{opts})[[2]]

which returns

{{{2.30259, 10}, {3.4012, 30}, {4.31749, 75}}, None}

which is the same as

{{N@Log[#], #} & /@ {10, 30, 75}, None}

Notice that each tick is specified as {value, label}, and it is needed to place the ticks correctly while labeling them correctly. Now, Show does not do the same processing because it knows nothing about how the plot was put together; all it knows about is the Graphics object, itself.

share|improve this answer
    
Thank you very much. Now I understand Show more! –  Taiki Apr 26 '13 at 14:15
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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