Dear member
I am using NNtool in Matlab. When I printed the figure as attached file, the text height (validation, training..etc) is default of 12. I try to use this code to change the text height:
set(findall(gcf,'-property','FontSize'),'FontSize',20). However, it does not work for this cas.
How to change the text height by using code instead of making manually in UI.
Thank you so much !

 채택된 답변

Mehmed Saad
Mehmed Saad 2020년 4월 23일

0 개 추천

I have this figure
Now i want to change the title fontsize of all the subplots
a=findall(gcf,'-property','FontSize','type','axes');
set([a.Title],'FontSize',15)

댓글 수: 5

Tran Hoa
Tran Hoa 2020년 4월 23일
편집: Tran Hoa 2020년 4월 23일
Thank you for your help. I tried but it does not work
error" No appropriate method, property, or field 'Title' for class
'matlab.graphics.GraphicsPlaceholder'."
Mehmed Saad
Mehmed Saad 2020년 4월 23일
attach the figure please
Tran Hoa
Tran Hoa 2020년 4월 23일
It doesnt have any figure
This is my code.
filename = 'Case1_beam_15elements.xlsx';
sheetname1 = 'Sheet1';
sheetname2 = 'Sheet2';
input = xlsread(filename,sheetname1,'A1:Z40000'); %call datas from sheetname1
target = xlsread(filename,sheetname2,'A1:Z40000'); %call datas from sheetname2
inputs=input';
targets=target';
x=inputs;
t = targets;
trainFcn = 'trainscg'; % Levenberg-Marquardt backpropagation.
% Create a Fitting Network
hiddenLayerSize = 10;
net = fitnet(hiddenLayerSize,trainFcn);
% Setup Division of Data for Training, Validation, Testing
net.divideParam.trainRatio = 70/100;
net.divideParam.valRatio = 15/100;
net.divideParam.testRatio = 15/100;
[net,tr] = train(net,x,t);
y = net(x);
e = gsubtract(t,y);
performance = perform(net,t,y)
Test_ouputs1=net(x);
Test_ouputs1 = [Test_ouputs1
targets];
And I add your instruction
a=findall(gcf,'-property','FontSize','type','axes');
set([a.Title],'FontSize',15)
Many thanks
Plot regression before that
nntraintool('plot','plotregression')
Now execute the command
a=findall(gcf,'-property','FontSize','type','axes');
set([a.Title],'FontSize',15)
Tran Hoa
Tran Hoa 2020년 4월 23일
It works well now
Thank you so much !

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Deep Learning Toolbox에 대해 자세히 알아보기

질문:

2020년 4월 23일

댓글:

2020년 4월 23일

Community Treasure Hunt

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

Start Hunting!

Translated by