4
$\begingroup$

When setting the Frame->True option in a ListLogLogPlot, the FrameTicks on the right and top side are linearly spaced.

Here is an example with the GridLines turned on to highlight the problem:

ListLogLogPlot[{{1, 1}, {100, 100}}, Frame -> True, GridLines->All]

enter image description here

Setting FrameTicks->All gets the the top and right ticks to show up correctly in log form, but this also adds text labels that I do not want.

ListLogLogPlot[{{1, 1}, {100, 100}}, Frame -> True, FrameTicks -> All, GridLines->All]

enter image description here

How can I get log tick marks to appear on the right and top without the associated text labels?

$\endgroup$
2
  • $\begingroup$ Doing the same evaluation in Mathematica 11 is one way to accomplish it. For the record, you could also control GridLines a little better using something like the following: ListLogLogPlot[{{1, 1}, {150, 150}}, Frame -> True, GridLines -> {{1, 10, 100}, {1, 10, 100}}] $\endgroup$
    – ktm
    Aug 10, 2016 at 15:22
  • $\begingroup$ Thanks @user6014! I will try this when I install v11, but for now, I will still let to get it working in v10 for my older codes. Thanks also for the GridLines setting suggestion. $\endgroup$
    – Rashid
    Aug 10, 2016 at 15:40

1 Answer 1

6
$\begingroup$

Updated

ListLogLogPlot[{{1, 1}, {100, 100}}, 
 Frame -> True, FrameTicks -> All, GridLines -> All, 
 FrameTicksStyle -> {{Automatic, Directive[FontOpacity -> 0, FontSize -> 0]}, 
                     {Automatic, Directive[FontOpacity -> 0, FontSize -> 0]}}]

enter image description here


ListLogLogPlot[{{1, 1}, {100, 100}}, Frame -> True, 
 FrameTicks -> {{Automatic, None}, {Automatic, None}}, 
 GridLines -> All]

enter image description here

$\endgroup$
4
  • $\begingroup$ Sorry, if my question was unclear, but I still want the FrameTicks to appear on the top and right. I just want them to correctly show at log locations. $\endgroup$
    – Rashid
    Aug 10, 2016 at 15:38
  • $\begingroup$ @Rashid Updated ... Is this what you want? $\endgroup$
    – Young
    Aug 10, 2016 at 15:40
  • 1
    $\begingroup$ Yes, the top version is perfect! Setting the FrameTickStyle font directives is exactly what I needed. Thanks for your help. $\endgroup$
    – Rashid
    Aug 10, 2016 at 15:42
  • $\begingroup$ @Rashid Happy to help. $\endgroup$
    – Young
    Aug 10, 2016 at 15:43

Your Answer

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

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