Minor grid-lines spacing issue
Mostrar comentarios más antiguos
I have created a GUI using GUIDE and have two checkboxes, where one toggles minor and the other toggles major gridlines. They both work by activating the appropriate lines, but the minor grid is exactly under the major. (So in effect only the major are visible.)
How can I fix this issue so that minor grid-lines appear in between the major as would be expected?
Note: I am using MATLAB 2015a
Major Grid Active

Minor Grid Active

Required Grid

Respuesta aceptada
Más respuestas (1)
Omanshu Thapliyal
el 28 de Mzo. de 2017
Another workaround apart from the answer above could be to specify the 'XMinorTickValues'. This lets you control the resolution of the minor grid. You could do so by getting the axis handle as
ax = gca;
ax.XMinorGrid = 'on';
ax.XAxis.MinorTickValues = 260:10:380;
You could set the minor grid resolution in the following part of your callback and change the minor grid lines to wherever you want them to be.
if get(hObject, 'Value') == 1
1 comentario
Ben Hall
el 29 de Mzo. de 2017
Categorías
Más información sobre Environment and Settings en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!