To remove the y-axis from a MATLAB plot, you can use the set
function to set the 'YTick'
property of the axes
object to []
.
Here is an example code block to remove the y-axis from a plot:
main.m93 chars8 lines
In this example, gca
gets the handle of the current axes, and the set
function sets the 'YTick'
property to an empty array, effectively removing the y-axis ticks and labels from the plot.
gistlibby LogSnag