For example in the Plot:

Plot[ Sin[x], {x, -2, 3}, Frame -> Automatic,  PlotTheme -> "Scientific"]

I want to hide the line where x=0. Anyone can help? Thanks a lot.

  • $\begingroup$ try Axes->False $\endgroup$ – kglr Nov 14 '18 at 3:56
  • $\begingroup$ It seems to be inherent in the PlotTheme -> "Scientific", even if you take @kglr's suggestion. Do you really need that option? $\endgroup$ – march Nov 14 '18 at 3:57

Those "axes" lines are actually coming from the GridLines option. So:

    Sin[x], {x,-2,3},
    Frame -> Automatic,
    PlotTheme -> "Scientific",
    GridLines -> None

enter image description here

  • $\begingroup$ Or GridLines -> {None, {0}} to leave the y == 0 line. However, it seems inconsistent to handle different themes differently (e.g., the "Classic" or "Minimal" themes appear to use Axes rather than GridLines). $\endgroup$ – Bob Hanlon Nov 14 '18 at 6:23
Plot[Sin[x], {x, -2, 3}, Frame -> Automatic, Axes -> {True, False}]

enter image description here


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.