gca behaves different in 2014b
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Christian Schultes
el 12 de Oct. de 2014
Comentada: Christian Schultes
el 12 de Oct. de 2014
Hello, Let assume there is already a figure open (like a GUI). Before 2014b with gca the handle number returned. Now with gca a new figure will open.
How could I get the current handle of a figure back?
In my special case, I try to get access to a certain axes of an existing figure. Any help avialable?
Thanks!
3 comentarios
Respuesta aceptada
Más respuestas (1)
David Barry
el 12 de Oct. de 2014
Christian,
This seems to work fine. Are you sure you definitely have an axes in your figure? gca will only open a new figure with an axes in if you call it and one doesn't already exist.
Try the code below and see if returns 1
f = figure;
a = axes('Parent', f);
g = gca;
a == g
Ver también
Categorías
Más información sobre Creating, Deleting, and Querying Graphics Objects en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

