I have an issue with FrameTicks when combined with a plot using Filling. I've plotted two curves (in one Plot[]) with two different colors and I'm trying to use the left and right columns of the frame to separate the data, to look like this:
However, when I use FrameTicks to add the left column's ticks, there is a little gap in the middle of the filling of the plots:
I don't understand the source of the problem, but it has to be linked to the FrameTicks function, because when I delete that part of the code, the gap disappears. Also, the function that I defined was using Piecewise, maybe there is something related. The code is
h = 4.9; (* m *)
g = 9.8; (* m/s^2 *)
m = 1; (* kg *)
Ekin[t_] := Piecewise[{{(m g^2 t^2)/2, 0 ≤ t ≤ Sqrt[(2 h)/g]},
{(m g^2 (t - 1)^2)/2 + m g (h - (t - 1) Sqrt[2 g h]), t > Sqrt[(2h)/g]}}]
Epot[t_] := Piecewise[{{m g (h - (g t^2)/2), 0 ≤ t ≤ Sqrt[(2 h)/g]},
{m g ((t - 1) Sqrt[2 g h] - (g (t - 1)^2)/2), t > Sqrt[(2 h)/g]}}]
Energy = Plot[{Ekin[t], Epot[t]}, {t, 0, 2 Sqrt[(2 h)/g]},
PlotStyle -> {{Thickness[0.004], Darker[Blue]}, {Thickness[0.004], Orange}},
PlotRange -> All, Filling -> Axis, Frame -> True,
FrameStyle -> {{Directive[Darker[Blue], Thick, 30], Directive[Orange, Thick, 30]},
{Directive[Black, Thick, 30], Directive[Black, Thick, 30]}},
FrameLabel -> {{Style[Row[{Subscript["E", "kin"] , " (J)"}], 50],
Style[Row[{Subscript["E", "pot"] , " (J)"}]]}, {Style["t (s)", 50], None}},
FrameTicks -> {{All, All}, {All, None}},
ImageSize -> {1080,720} ]
Well, I changed the fontsize of the left label from 50 to 49 and this practically solves the problem. But then, the question is, why is happening this?