# Overlay Plots in Mathematica 11 [duplicate]

I'm trying to do an overlay plot in the vein of the solutiosn given in (Frame labels for Overlay of two plots to look like plot with two y-axes), but with the new mathematica 11 version it seems that it is not possible to get tick labeling on the right side. Is there another way to do this now?

Specifically, using:

p1 = Plot[5 Sin[t] + 95, {t, 1, 10}, PlotStyle -> {Black},
Axes -> None, BaseStyle -> {FontSize -> 14},
Ticks -> {{}, {94, 96, 98, 100}},
ImagePadding -> {{50, 50}, {20, 2}},
FrameTicks -> {None, All, None, None},
Frame -> {True, True, False, False},
PlotLegends ->
Placed[LineLegend[{Black,
Directive[Dashed, Black]}, {"First thing", "Other thing"}],
Bottom], FrameLabel -> {{"First thing", None}, {"Stuff", None}}]

p2 = Plot[5 Cos[t] + 5, {t, 1, 10}, Axes -> None,
PlotStyle -> {Directive[Black, Dashed]},
BaseStyle -> {FontSize -> 14}, Ticks -> {{}, {2, 4, 6, 8, 10}},
FrameTicks -> {None, None, None, All},
ImagePadding -> {{50, 50}, {20, 2}},
Frame -> {False, False, False, True},
FrameLabel -> {{None, "Thing"}, {None, None}}]

p = Overlay[{p1, p2}]


no longer gives tick labeling on the right side as shown in the link.

• It seems that old 4element spec for FrameTicks is not supported anymore. It works with FrameTicks -> {{None, All}, {None, None}} though.
– Kuba
Commented Aug 25, 2016 at 13:24
• p.s. notice that the code essential for that question can be reduced to Plot[ Cos[t], {t, 1, 10}, FrameTicks -> {All, All, All, All}, Frame -> True], try it next time :)
– Kuba
Commented Aug 25, 2016 at 13:26
• The issue is with the way FrameTicks are specified in your code. The documentation says in the detail section that the correct form is FrameTicks -> {{left,right},{bottom,top}}. Commented Aug 25, 2016 at 13:26

The proper syntax for FrameTicks is

{{left,right},{bottom,top}}

In previous versions you could get away with using an alternative {bottom, left, top, right}, (correct me if I have those in the wrong order) but no longer.

Keeping your p1 definition,

p2 = Plot[5 Cos[t] + 5, {t, 1, 10}, Axes -> None,
PlotStyle -> {Directive[Black, Dashed]},
BaseStyle -> {FontSize -> 14}, Ticks -> {{}, {2, 4, 6, 8, 10}},
FrameTicks -> {{None, All}, {None, All}},
ImagePadding -> {{50, 50}, {20, 2}},
Frame -> {False, False, False, True},
FrameLabel -> {{None, "Thing"}, {None, None}}];
p = Overlay[{p1, p2}]


• Thanks everyone, that did the trick. Commented Aug 26, 2016 at 20:40