Copy xlabel (ylabel or zlabel) Rotation property from one figure to another: why copyobj is not working? And how to work it around?

3 Ansichten (letzte 30 Tage)
Dear all, I am facing a problem with some figures of mine and I would like to ask for your help.
I am generating a couple of 3D figures where x,y labels are rotated for nice plotting by +5 and -80 degrees respectively (by 'Rotation' property in xlabel and ylabel).
Let's say that each figure is in h(i) (i=1,2) handles.
Next I am creating a third figure where I am lumping both these two figures by the code snippet:
% New figure to lump the two subfigures into
g = figure;
% Target axes in the destination figure
ax{1) = [X1,Y1,W1,H1];
ax{2) = [X2,Y2,W2,H2];
% Copy loop (assuming only one axis object)
for i = 1:length(h)
handle = get(h(i),'Children');
newh = copyobj(handle,g);
set(newh,'Units','centimeters','Position',ax{i});
end
In this fashion however I am not able to transfer Rotation properties of my x,y-labels in the original figures. How can I achieve this (i.e. how could I edit the code above and promptly copy everything - including labels - of my figures)?
Any help will be greatly appreciated.
Thanks in advance,
Maurizio

Antworten (0)

Kategorien

Mehr zu 2-D and 3-D Plots finden Sie in Help Center und File Exchange

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by