MATLAB: How to remove the tic labels but not the marks axislabel;plottics I would like to remove tick marks on the y-axis but not on the x-axes. And I want to remove the labels (numbers) of all ticks. Best Answer what you could do is use the set command for the axis. likeset(gca,'YTick',[]); %which will get rid of all the markings for the y axisorset(gca,'Yticklabel',[]) set(gca,'Xticklabel',[]) %to just get rid of the numbers but leave the ticks. Related SolutionsMATLAB: Is there a way to remove individual tick labels ax = gca; %or as appropriateyticklabels = get(ax, 'YTickLabel');yticklabels{end} = ''; %needs to exist but make it emptyset(ax, 'YTickLabel', yticklabels); MATLAB: How to set x-axis labels under certain tick marks Try this:ax = gca; % Get handleax.XTicks = [20,60,100,120]ax.XTickLabel = {'','','',''} % Labels are null. Related QuestionDeletting X and Y axes ticksHow to not display abscissa ticks using command while keeping the ticks of y-axisHow to label y axis tick marksReplace colorbar values with labels and center the tick marksRemove gridline from plotIs there a way to get the values associated with the *minor* tick marks
Best Answer