crosshairs or just vertical line across linked axis plots
Mostrar comentarios más antiguos
What I have are plots that are linked by the linkaxes() function. I would like to have a vertical line that spans all of the plots so that I can compare the peaks and valleys interactively between plots.
Respuesta aceptada
Más respuestas (3)
Jiro Doke
el 22 de Feb. de 2011
1 voto
2 comentarios
Mark Dragovan
el 22 de Feb. de 2011
arysteasz
el 27 de En. de 2018
How to get matrix index from this code?
Patrick Kalita
el 22 de Feb. de 2011
f = figure;
subplot(2,1,1)
plot(rand(5))
subplot(2,1,2);
plot(magic(5))
set(f, 'Pointer', 'fullcrosshair')
4 comentarios
Walter Roberson
el 22 de Feb. de 2011
That doesn't span multiple plots.
Patrick Kalita
el 22 de Feb. de 2011
I'm not sure what you mean. As long as the axes are arranged vertically in a figure (which isn't too unusual) it seems to do what was asked.
Walter Roberson
el 22 de Feb. de 2011
I see what you mean, Patrick. On the other hand, it would cover the entire figure rather than just the plots.
Jiro Doke
el 22 de Feb. de 2011
It seems that this solution is the easiest and cleanest when the axes are stacked vertically. I'm not entirely sure what the OP meant when he said "compare the peaks and valleys interactively between plots". Is it just visually line things up, or does he want more information like actual numbers.
claudio
el 26 de Mayo de 2014
0 votos
Is it possible to display the values in a window (like in datacursormode, "window inside figure" display style)??
Categorías
Más información sobre Annotations 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!