Grid and Gridlines
In MATLAB we get the option to display gridlines and the option to have minor gridlines as well. In the case of minor gridlines, the gridlines on tick points are normal whereas the lines in between major ticks are fainter. Syntax of the same is:
plots
…………
grid on
grid minor
See the following implementation for understanding.
Example 2:
Matlab
% MATLAB code for Grid and Gridlines x = linspace(-3,3,100); plot(x,x.^3) % Turning on grid grid on % Turning on minor gridlines grid minor |
Output:
As can be seen that the gridlines on the x and y tick points are denser than the ones in between them.
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.