필터 지우기
필터 지우기

Adding a title to a graph

조회 수: 4 (최근 30일)
Benjamin
Benjamin 2012년 12월 5일
I am trying to add a title to a graph I am making. I am using sprintf to allow the title to change depending on the values entered earlier in the script. So far, it is displaying all the wording correctly, but I want to make it bold and it is not working.
Anyone know what the problem is?
title(sprintf('Beam Deflection for a %s Beam \n%6.2f lb. load applied to a %s %s'...
,beam.strsupport,beam.magnitude,beam.strmaterial,beam.strcross),'fontweight','b')

채택된 답변

Matt Fig
Matt Fig 2012년 12월 5일
title(sprintf('Beam %s Beam \n%6.2f lb. applied to a %s %s'...
,'gold',200,'joist','pooter'),'fontweight','b');
This works on my machine. Are you saying the fontweight is not bold?
  댓글 수: 2
Benjamin
Benjamin 2012년 12월 5일
편집: Benjamin 2012년 12월 5일
Yes. It is not displaying in bold And I would also like the font size to be 14
Matt Fig
Matt Fig 2012년 12월 5일
Try to set the handle.
T = title('hello');
set(T,'fontsize',14,'fontweight','bold')

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Title에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by