Cannot change title of a saved figure." Unable to perform assignment because dot indexing is not supported for variables of this type."

4 ビュー (過去 30 日間)
I want to change the title of the figure I saved by running
title('Ortskurve von G_0(jw), Volleingriff, Vorschub in -X-Richtung, a_p variiert');
MATLAB returns the following error:
Unable to perform assignment because dot indexing is not supported for variables of this type.
Error in ctrluis.axesgroup/addbypass>localTitle (line 24)
this.Title = string;
Error in mwbypass (line 17)
hh = feval(fcn{:},varargin{:});
Error in title (line 75)
h = mwbypass(ax,'MWBYPASS_title',titlestr,pvpairs{:});
Upon error, the variable "this" has value 0+0i
I tried to change title in Property Inspector though I can't find any property named "Title" in gcf.

採用された回答

Voss
Voss 2022 年 2 月 11 日
編集済み: Voss 2022 年 2 月 11 日
I'm not sure what causes that error, but here's a workaround:
S = load('Hermle C800 G0 Vorschub -X.fig','-mat');
f = S.hgM_070000.GraphicsObjects.Format3Data;
ax = findall(f,'Type','axes','HandleVisibility','off');
set(get(ax,'Title'),'String','Ortskurve von G_0(jw), Volleingriff, Vorschub in -X-Richtung, a_p variiert');
figure(f);
  2 件のコメント
DFfd
DFfd 2022 年 2 月 11 日
Thanks for the solution.
Before saving the figure I added the vertical line at Re=1 by running
xline(1,'HandleVisibility','off');
I guess that's where HandleVisibility was set to off. I didn't know this would have such an adverse effect on title changing.
Voss
Voss 2022 年 2 月 11 日
I don't think the error was related to HandleVisibility, because I set it to 'on' manually and still had the same error using the title() function.
Anyway, glad the workaround seems to work!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeTitle についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by