logo

How to Add Borders to Figures in MATLAB 📂Programing

How to Add Borders to Figures in MATLAB

Code

>> scatter(rand(10, 1), rand(10, 1))

alt text

For example, when plotting scatter plots using MATLAB, the default setting leaves the upper and right edges open, making the border invisible. To make the border visible, use the box on command as shown below1.

>> box on

alt text

Environment

  • OS: Windows
  • MATLAB: 2023b