inset of matlab figure inside the figure doesnot show new axes label

10 visualizaciones (últimos 30 días)
Here is the code I used:
figure (3)
plot(total_cellcount.time,(prolif.')./total_cellcount.sum_sum_cell_count,'o')
xlabel('Time');
ylabel('No. prolif. cells/total No. cells')
axes('Position',[.7 .7 .2 .2])
box on
plot(total_cellcount.time,prolif,'o')
xlabel('Time');
ylabel('No. prolif. cells')
The axes label of inset figure is the same as the main figure. How can I fix it?
  1 comentario
dpb
dpb el 18 de Ag. de 2019
Editada: dpb el 19 de Ag. de 2019
Looks OK here...need enough to duplicate the issue. Have a feeling the figure you generated didn't come from the code above in its entirety...particularly since there's nothing to have generated the data it has to be only a piece.
In general when using multiple axes, save the axes handle to each figure and ensure are plotting into the desired axis. Probably (altho we can't see it here) your actual problem figure has had something else happen that changed focus so that you wrote to the other axes handle than you expected.
Execute close 3 and then only the above code and see if symptoms don't change. But still, save the handles of the two axes when you create them and then use that axis as the target for the various plotting instructions instead of default.

Iniciar sesión para comentar.

Respuesta aceptada

Urmila Rajpurohith
Urmila Rajpurohith el 21 de Ag. de 2019
When using multiple axes in a figure return the Axes objects as hAx1,hAx2
hFig=figure (3)
hAx1=axes(Parent,hFig)
plot(hAx1,total_cellcount.time,(prolif.')./total_cellcount.sum_sum_cell_count,'o')
xlabel(hAx1,'Time');
ylabel(hAx1,'No. prolif. cells/total No. cells')
hAx2=axes('Position',[.7 .7 .2 .2])
box on
plot(hAx2,total_cellcount.time,prolif,'o')
xlabel(hAx2,'Time');
ylabel(hAx2,'No. prolif. cells')
You can refer to the following documentation link for more information regarding "Axes properties".

Más respuestas (0)

Categorías

Más información sobre Graphics Performance en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by