필터 지우기
필터 지우기

What happend about my plotting style

조회 수: 2 (최근 30일)
sheng liu
sheng liu 2015년 2월 27일
댓글: sheng liu 2015년 3월 3일
As I know that starting in R2014b, MATLAB graphics titles use a bold and slightly larger font for better visibility. I am using R2014b, what happend to my plotting style?
The left is a example picture from help center, the right is my plotting. You can see the difference between the titles.

채택된 답변

Mike Garrity
Mike Garrity 2015년 2월 27일
What happens if you do the following?
get(gca,'FontSize')
get(get(gca,'Title'),'FontSize')
get(get(gca,'Title'),'FontWeight')
My guess is that it's going to be something interesting about your font, so you should probably also do this:
get(gca,'FontName')
  댓글 수: 3
Mike Garrity
Mike Garrity 2015년 3월 2일
I think I've figured it out.
From your screenshot, it looks like your locale is Chinese. Is that correct? It turns out that the visual designer who added the bold to the title felt that it didn't look good with Kanji characters because they tend to be quite a bit more complex than Roman characters. The way this was implemented was to look at the locale. If is CN, JP, or KR, then the factory default for the title's FontWeight is normal instead of bold.
In your example, this is probably not a great decision. Even though your locale is CN, you have Roman characters in your title. We should see if we can find a way to be smarter about that.
You can workaround the factory default by adding something like this to your startuprc.
set(0,'DefaultAxesTitleFontWeight','bold')
sheng liu
sheng liu 2015년 3월 3일
Thank you! You solved my problem. After I changed the language from chinese to english, the title font is bold. You are right, chinese characters are too complicated.

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

추가 답변 (2개)

Image Analyst
Image Analyst 2015년 2월 27일
It could be that the font MATLAB actually uses to create the figure is different than what's in the help. I don't know how they got that picture in the help. Maybe the process of copying and pasting it in there caused things to adjust slightly. You know that you have control over the appearance of the title via input arguments like 'FontSize', etc. in the title() function.

Tom
Tom 2015년 2월 27일
An example of how to change the appearance of the title would be:
title('Title String','fontweight','bold','fontsize',14)
This is what I typically do.

카테고리

Help CenterFile Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by