x and y ticks in pcolor plots
47 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Cesium Modern
el 16 de Feb. de 2023
Comentada: Les Beckham
el 16 de Feb. de 2023
I have a p-color plot with the 'EdgeColor' property set to none.
This not only eliminates the grid (which I do not want) but removes the x and y-axes ticks.
How can I enable these ticks and show them outside the plot, with the following
set(gca,'TickDir','out')
Below is what I am trying to achieve with the ticks
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1297780/image.jpeg)
0 comentarios
Respuesta aceptada
Voss
el 16 de Feb. de 2023
Set the axes property 'Layer' to 'top' in order to get the grid to show up on top of the pcolor surface.
% a pcolor with EdgeColor 'none':
set(pcolor(zeros(100)),'EdgeColor','none')
% set axes properties:
set(gca(), ...
'XGrid','on', ...
'YGrid','on', ...
'Layer','top', ...
'TickDir','out', ...
'TickLength',[0.05 0.05])
4 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Axis 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!