How to adapt the space between the grid lines to the space between the ticks?
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Good evening everyone
As I wanted the grid lines of my plot to have a different color from the axis, I put a second axis under the first. Now I doubled the ticks on the y axis but the grid lines aren't doubleing too. Has anyone an idea how to fix this?
Thank you (Btw I am still using R2007b)
0 comentarios
Respuestas (1)
dpb
el 17 de Mayo de 2018
You have to address the proper axes object to change its properties...to make working with multiple axes easier, be absolutely sure to save the handles of each when you create them so have to "talk to" the desired one.
Post your code so far so we can use it for pedagogical purposes to get from where you got (sounds like good start) to where you're headed...(and actually, the above hint may be all the help you really need, we'll see :) ).
4 comentarios
dpb
el 18 de Mayo de 2018
>> help gca
gca Get handle to current axis.
H = gca returns the handle to the current axis in the current
figure. The current axis is the axis that graphics commands
like PLOT, TITLE, SURF, etc. draw to if issued.
...
gca is a function so its return value is variable depending on what has happened since -- this is particularly significant when either in a GUI or interactive session and the user (or you) switches context.
Ah, ok, older releases do prevent using later features...
Ver también
Categorías
Más información sobre Graphics Object Programming 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!