www.gusucode.com > graphics 案例源码程序 matlab代码 > graphics/ChangeColorOfBoxOutlineExample.m
%% Change Color of Box Outline % Create a scatter plot and display the box outline around the axes. % Copyright 2015 The MathWorks, Inc. x = rand(10,1); y = rand(10,1); scatter(x,y) box on %% % Change the color of the box outline in the _x_-axis direction by setting % the |XColor| property of the axes. Starting in R2014b, you can use dot % notation to set properties. If you are using an earlier release, use the % <docid:matlab_ref.f67-432995> function instead. ax = gca; ax.XColor = 'red';