To remove the y-axis and box in MATLAB, you can use the following code:
main.m112 chars9 lines
The gca
function gets the handle to the current axis object, which allows us to modify its properties. The YTick
property controls the y-axis tick marks, and setting it to an empty array removes them. The box off
command removes the box around the plot.
gistlibby LogSnag