Borrar filtros
Borrar filtros

add more X and Y ticks (dynamically)

9 visualizaciones (últimos 30 días)
Frank
Frank el 28 de Dic. de 2016
Respondida: Sharmila Raghu el 5 de En. de 2017
Hi,
The auto tick mode for the X and Y axis works well when you zoom, pan and resize. But often I find that there are not enough ticks added to both axes. There can be large gaps between the labels, big enough to add one or two more ticks with labels.
Is there a simple way to add more X and Y ticks, while keeping the benefits of the auto mode (ticks are updated dynamically after zoom, pan and resize)?
If not, i have to write something on my own (similar to Datetickzoom), but I figured I could ask first...
Btw. if I create a plot in R2015b with the code below, then there is no tick update for the y axis at all. (with a max of 120 it works ok)
figure
xlim([0,18]);
ylim([0,150]);

Respuestas (1)

Sharmila Raghu
Sharmila Raghu el 5 de En. de 2017
Unfortunately, there is currently no way to change how many ticks are chosen in ‘auto’ mode. I work for MathWorks and I have forwarded this feedback to the appropriate product team. You may want to turn on the minor grid. The grid lines may help in gauging data between ticks, but I understand this isn’t exactly what you want.
Regarding the [0,150] limits, 50 is chosen as the tick spacing because choosing a smaller value would result in too many ticks.You could choose [0, 140] or [0,160] and the spacing would become 20 and more ticks would be drawn.

Etiquetas

Productos

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by