Axes Label
You can simply change the x, y, and/or z axis’s label by using the following commands
xlabel(‘label1’)
ylabel(‘label2’)
zlabel(‘label3’)
Example 3:
Matlab
% MATLAB code for Axes Label x = linspace(-3,3,100); plot(x,x.^3) % Defining x label xlabel( "X-gfg" ) % Defining y label ylabel( "Y-gfg" ) |
Output:
Axes Appearance and Behavior in MATLAB
MATLAB offers many types of axes such as polar axes, cartesian axes, etc. The default appearances of these axes are dynamically determined by MATLAB on case-by-case requirements. However, MATLAB does provide its users the option to alter the behavior of these axes, by using some built-in functions. In this article, we shall how we can use these functions to alter the appearance of cartesian axes; the same methods could be applied to polar axes and other available axis types.
Contact Us