MATLAB Answers

how to display only bottom and left axis lines, but not right and top axis lines?

320 views (last 30 days)
Jun on 31 Jan 2012
Answered: Andrew Hook on 31 Oct 2018
Matlab plots by default draw 4 lines with tick marks on left, bottom, right and top. I wanted to create 2D plots similar to those in excel, in which only the bottom and left have axis and tick mark, while the line and ticks on right and top are not displaying. I tried set 'Box' to be 'off', but does not seem to work. Any suggestions on how to do this? thank you.

Accepted Answer

Jessica Lam
Jessica Lam on 31 Jan 2012
  1 Comment
Jun on 31 Jan 2012
It worked for me. Thank you so much.
Below is my code, which I hope will be helpful for some in the community.

Sign in to comment.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!