MATLAB: How to plot like the inserted picture plot Hello guys, I want to plot like the picture below in matlab: Is it possible in Matlab? In X-Axis is the Frequency. Every row is a node and the colours are the values of the results. Best Answer You need to first collect all your values for yticks and labels, then set them all at once. For examplenfiles = 10;for a = 1:nfiles ticks(a) = a; % or whatever the ytick is labels{a} = sprintf('Label %d',a);endfigureimagesc(magic(nfiles))ax = gca;set(ax,'YTick',ticks,'YTickLabel',labels);set(ax,'YDir','normal')Here is how you would add white lines.x = [0.5 10.5]; % or however big your xaxis islinelocs = [ticks(1:end-1) + 0.5]';hold onplot(x,[linelocs, linelocs],'w-','LineWidth',2)And you can find the properties for the x-axis tick (length, colour, etc.) in herexax = get(ax,'XAxis'); Related SolutionsMATLAB: Deletting X and Y axes ticks set(gca,'xtick',[]) set(gca,'ytick',[]) MATLAB: 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); Related QuestionHow to remove the tic labels but not the marksHow to have a graph with labeled x-axis ticks on the bottom and top of the graphFontsize and properties of Xticklabels using figure handlesInconsistent behavior updating tick labelingImproving readability of Matlab graphWhite space at the beginning and ending of xaxisFlip the Y-axis ticks without flipping the plot
Best Answer