The title function of Matlab drawing

Source: Internet
Author: User
title

ADD title to axes or legend collapse All in page Syntax title (TXT) example title (Txt,name,value) example title (O bj,___) Example T = title (___) Example Description

Example

Title (TXT) adds the specified title at the top and in the center of the current axes. reissuing the title command causes the new title to replace the old title.

Example

Title (txt,name,value) additionally specifies title properties using one or more name,value pair arguments.

Example

Title (obj,___) adds a title to the object specified by obj, instead of the current axes. Specify obj as either an axes object or a Legend object. Obj can precede any of the input argument combinations in the previous syntaxes.

Example

t = title (___) Returns the object used as the title text. Use T-make future modifications to the title. Examples

Collapse All Add Title to current figure Open this Example

Create a figure and display a title in the current axes.

Figure
Plot ((1:10). ^2)
title (' My title ')

You also can call the title with a function, that returns a string. For example, the DATE function returns a string containing today's date.

Title (date)

Matlab®sets the output of date as the axes title. Include Variable ' s Value in Title Open this Example

Include the value of variable C in a title.

Figure
Plot ((1:10). ^2)
f =;
c = (f-32)/1.8;
Title ([' Temperature is ', Num2str (c), ' C '])

Create multicolored Title Using TeX Markup Open this Example

In a TeX string, with the color modifier \color to change the color of characters following it from the previous color.

Figure
Plot ((1:10). ^2)
title ([' \fontsize{16}black {\color{magenta}magenta ' ... ')
\color[rgb]{0.5.5}teal \color{red}red} Black again '])

Create colored Title Using name,value Pair Argument Open this Example

Use the name,value pair ' color ', ' m ' to set the Color of the title to magenta.

Figure
Plot ((1:10). ^2)
title (' Case number # 3 ', ' Color ', ' m ')

Include Greek Symbols in Title Open this Example

Use a TeX string to include Greek symbols in a title.

t = (0:0.01:0.2);
y = exp ( -25*t);
Figure
Plot (t,y)
title (' Y = \ite^{\lambda t} ', ' Color ', ' B ')

The ' interpreter ' property must is ' Tex ' (the default).

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.