1
$\begingroup$

When I change the frame's color in a plot (e.g. from the default grayish to Black) only the Ticks on the Left and Bottom are changed properly, while the Ticks on the Top and Right are much less visible and if I copy the plot they almost disappear.

See an example below:

Plot[
 Sin[x], {x, -2, 2},
 PlotRange -> {{-2, 2}, Automatic},
 Axes -> {True, False},
 PlotPoints -> 100,
 PlotStyle -> {Blue, Thickness[0.005]},

 Frame -> True,
 FrameStyle -> Black,
 FrameTicksStyle -> {{Black, Black}, {Black, Black}},
 FrameLabel -> {"\[CapitalDelta]k (u.a.)", 
   "\[Phi](\[CapitalDelta]k) (u.a.)"},
 LabelStyle -> {24, Black},
 ImageSize -> 700,
 Background -> Transparent
 ]

Output:

The ticks on the top and right side are barely visible

I added this line:

 FrameTicksStyle -> {{Black, Black}, {Black, Black}},

because I was trying to force it to behave properly, but it didn't help at all...

Is there any way to fix it?

$\endgroup$
  • 1
    $\begingroup$ I can't reproduce your problem with MMA 11.1 on Win 10. How exactly are you copying/inserting the plot? $\endgroup$ – Lukas Lang Aug 19 '17 at 18:46
  • $\begingroup$ I'm on MMA 11.1 on Mac. I'm just copying the plot and pasting in "add image", but what you see in this post is exactly what I see on Mathematica, so it can't be a problem of exporting the figure, it has to be in Mathematica itself! $\endgroup$ – Fraccalo Aug 19 '17 at 19:34
1
$\begingroup$

I can reproduce your problem with V11.1.1 running on OS X 10.10.2. The only way to fix it AFAIK is take explicit control of the frame tick rendering. This can be done as follows.

With[{divisions = 4, xmax = 2, ymax = 1},
  Module[{lfTicks, btmTicks},
    lfTicks =
      Table[
        {y, y // N, {.02, 0}, Directive[Black, Thick]}, 
        {y, Subdivide[-ymax, ymax, divisions]}];
    btmTicks =
      Table[
        {x, x // N, {.02, 0}, Directive[Black, Thick]}, 
        {x, Subdivide[-xmax, xmax, divisions]}];
    Plot[Sin[x], {x, -xmax, xmax},
      Axes -> {True, False},
      PlotStyle -> {Blue, Thickness[0.005]},
      Frame -> True,
      FrameStyle -> Black,
      FrameTicks -> {{lfTicks, Automatic}, {btmTicks, Automatic}},
      FrameTicksStyle -> 16,
      FrameLabel -> {"Δk (u.a.)", "ϕ(Δk) (u.a.)"},
      LabelStyle -> {24, Black},
      ImageSize -> 500]]]

plot

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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