Mathematica Stack Exchange is a question and answer site for users of Mathematica. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
    
Great that your question gives a copiable solution to my problem... – Chromatic Nov 19 '15 at 18:58
up vote 5 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

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.