- I observe the same effect in R2016b, while in R2009a the font size was preserved.
- When I copy an axes object, I'd expect, that the font size of the labels is copied.
Copyobj did not copy attributes/properties
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Hi,
I want to copy existing axes in a new figure using copyobj. Unfortunately, the attributes did not seem to be copied well. Here the font size of new axes xlabel should be 14 and it is 11. Is this the normal behavior?
>> figure
>> hax=gca;
>> set(get(hax,'xlabel'),'fontsize',14,'string','My xlabel')
>> get(get(hax,'xlabel'),'fontsize')
ans =
14
>> fig2=figure;
>> hax2=copyobj(hax,fig2);
>> get(get(hax2,'xlabel'),'fontsize')
ans =
11
Thx,
Luc
0 Kommentare
Antworten (3)
Jan
am 10 Dez. 2017
Bearbeitet: Jan
am 10 Dez. 2017
If this is the "normal" behavior or not depends on the definition of "normal": Do you mean the intended or the usual behavior?
0 Kommentare
Mack Gardner-Morse
am 30 Nov. 2018
I agree with Jan. I have the same problem with copyobj in Release 2018a. Both font size and font weight in labels and titles are not preserved using copyobj. I did not see this in much earlier versions of Matlab. Someone should make a bug report.
1 Kommentar
Siehe auch
Kategorien
Mehr zu Interactive Control and Callbacks finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!