I am trying to create a two-axis plot with error bars, using the overlay function. However, for some reason the tick labels don't render on the right hand axis and I have no idea why!
Needs["ErrorBarPlots`"]
data1 = {{{1, -40}, ErrorBar[0.5]}, {{3, -42},
ErrorBar[0.5]}, {{5, -43}, ErrorBar[0.5]}};
data2 = {{{1, -20}, ErrorBar[0.5]}, {{3, -22},
ErrorBar[0.5]}, {{5, -26}, ErrorBar[0.5]}};
data3 = {{{1, 19}, ErrorBar[0.5]}, {{3, 25}, ErrorBar[0.5]}, {{5, 30},
ErrorBar[0.5]}};
p1 = ErrorListPlot[data1, ImagePadding -> 45,
Frame -> {True, True, True, False},
FrameTicks -> {All, All, None, None}, GridLines -> Automatic,
ImageSize -> Large, PlotRange -> {{0, Automatic}, {-45, -15}},
PlotStyle -> Red];
p2 = ErrorListPlot[data2, Axes -> False, ImagePadding -> 45,
ImageSize -> Large, PlotRange -> {{0, Automatic}, {-45, -15}},
PlotStyle -> Green];
p3 = ErrorListPlot[data3, Axes -> False, ImagePadding -> 45,
Frame -> {False, False, False, True},
FrameStyle -> {Automatic, Automatic, Automatic, Blue},
FrameTicks -> {None, None, None, Automatic}, ImageSize -> Large,
PlotRange -> {{0, Automatic}, All}, PlotStyle -> Blue];
Overlay[{p1, p2, p3}]
I tested the individual plots and the ticks render for plots with axis on the left hand side, but not the right.
Any thoughts?
FrameTicks -> {{None, All}, {None, None}}in your definition ofp3– grbl Dec 01 '16 at 21:24