dynamic y-tick label

1 visualización (últimos 30 días)
Yona
Yona el 4 de Nov. de 2014
Comentada: Titus Edelhofer el 4 de Nov. de 2014
It have a way to save the y-tick to be dynamic and decide what will be the label format. In default is show 5 number, i want to show 6 number so 1.23456 and 1.23457 will not be both 1.2345. and the same for 12345.6, show the number and not 1.2345 (10^4 in top).
because i use a lot zoom in and zoom out, i cannot use a fix YTickLabel.

Respuesta aceptada

Titus Edelhofer
Titus Edelhofer el 4 de Nov. de 2014
Hi Yona,
what you can do is to add a callback to your zoom function, i.e.,
h = zoom(fig);
set(h, 'ActionPostCallback', @ZoomCallback)
where in ZoomCallback.m you do the formatting of the YTickLabels according to the current YTick.
Titus
  2 comentarios
Yona
Yona el 4 de Nov. de 2014
thank, it work.
now i need to add a changing in "pan" too...
Titus Edelhofer
Titus Edelhofer el 4 de Nov. de 2014
Same story:
h = pan(fig);
;-)
Titus

Iniciar sesión para comentar.

Más respuestas (0)

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by