every second label is showed in corr.matrix only, why?
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
when i tipe in the code below, every second axes is shown only. this means the first point is not named at all, the second is named after the first ones name, the third is not named, the fourth has the name of the second value on that axis. I dont get why. do you? thanks a lot
[r,p] = corrcoef(x); % Compute sample correlation and p-values.
imagesc(p); % plot the matrix set(gca, 'XTick'); % center x-axis ticks on bins set(gca, 'YTick'); % center y-axis ticks on bins set(gca,'XTickLabel',{'1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19'}) set(gca,'YTickLabel',{'1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19'}) title('Correlation Matrix', 'FontSize', 12); % set title colormap('jet'); % set the colorscheme colorbar
0 comentarios
Respuestas (2)
owr
el 15 de Mzo. de 2013
You set the labels, but not the ticks themselves. Try something like this:
set(gca, 'XTick',1:19);
set(gca,'XTickLabel',{'1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19'})
0 comentarios
Ver también
Categorías
Más información sobre Grid Lines, Tick Values, and Labels en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!