# How can I use Frame and axes on the same plot?

It is necessary to display the Frame (in the left edge of the plot) and usual axes (in the bottom) in the same plot. Mathematica doesn't support this feature as discussed earlier. But there is a workaround that tackles the problem with the use of Overlay function. In my example, unfortunately, zigzag lines are shifted a bit

Overlay[{ListLinePlot[{2, 3, 1, 4, 2}, Frame -> {{True, False}, {False, False}}, ImageSize -> 600],ListLinePlot[{2, 3, 1, 4, 2}, Ticks -> {{2, 3, 4}, None}, Axes -> {True, False}, ImageSize -> 600]}]


Is it possible to eliminate the offset?

• Perhaps if you used the same ImagePadding on all of the plots, like ImagePadding -> {{10, 10}, {10, 10}}. You'll have to tinker with what values to choose to make it so that nothing gets cut off and the margins aren't too large. But, how "minimal" is this example? Are you really plotting the same function? There might be a way to do this with just one single call to a plotting function, so it might be worth posting your actual code here. Commented Nov 8, 2023 at 20:03
• "Mathematica doesn't support this feature as discussed earlier" - please provide a hyperlink so that the rest of us can be caught up to speed. Commented Nov 8, 2023 at 22:41
• Your example looks very much like ListLinePlot[{2, 3, 1, 4, 2}, Frame -> {{True, False}, {True, False}}, FrameTicks -> {Automatic, {{2, 3, 4}, None}}]. Commented Nov 8, 2023 at 22:44
• Have you tried using Show[{ListLinePlot[{2, 3, 1, 4, 2}, Frame -> {{True, False}, {False, False}}, ImageSize -> 600], ListLinePlot[{2, 3, 1, 4, 2}, Ticks -> {{2, 3, 4}, None}, Axes -> {True, False}, ImageSize -> 600]}] Commented Nov 9, 2023 at 13:09
• Thanks, Jason. Your code with addition Axes->False (in order to hide axis in general case) works fine. Thank you to all contributors, your suggestions were useful. Commented Nov 9, 2023 at 14:39