0

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?

Konstantin
  • 906
  • 5
  • 8
  • 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. – march Nov 08 '23 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. – Jason B. Nov 08 '23 at 22:41
  • 1
    Your example looks very much like ListLinePlot[{2, 3, 1, 4, 2}, Frame -> {{True, False}, {True, False}}, FrameTicks -> {Automatic, {{2, 3, 4}, None}}]. – Jason B. Nov 08 '23 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]}] – Navvye Nov 09 '23 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. – Konstantin Nov 09 '23 at 14:39

0 Answers0